|
-
April 23rd, 2007, 11:29 AM
#1
onclick event problem urgent
Last edited by superstarprogammer; May 8th, 2007 at 03:33 PM.
-
April 23rd, 2007, 11:43 AM
#2
Re: onclick event problem urgent
This is wrong for so many reasons 
Below is a corrected solution (untested, but I think it'll be fine).
1) Javascript allows strings to be quoted with double (") and single (') quotes. Because you need to have a string literal INSIDE the attribute onclick in HTML -- which also is a quoted string -- you need to use single quotes (or " inside the attribute string in order to represent a javascript string. Also, you should set your href as well.
Code:
<a href=""http://misip249/development/MemberStatements/BinaryData.aspx?name= "& LsStatementName & _
" onclick=""OpenIssue('http://misip249/development/MemberStatements/BinaryData.aspx?name=" & LsStatementName & "'); return false;"
Note, I set the href equal to the same link as the javascript version. This allows the page to still load even if the javascript fails for some reason. I also used single quotes for the string literal for the link.
-
April 23rd, 2007, 12:25 PM
#3
Re: onclick event problem urgent
Last edited by superstarprogammer; May 8th, 2007 at 03:30 PM.
-
April 23rd, 2007, 12:38 PM
#4
Re: onclick event problem urgent
it'll be easier if you paste me the rendered content. This kind of string building is a pain in the butt to look at without debugging it by looking at the rendered content, so can you get it to compile and paste me that piece of code in rendered HTML? Then I can fix the rendered HTML and you can figure out how to put it into the string that you need.
-
April 23rd, 2007, 12:41 PM
#5
Re: onclick event problem urgent
the rendered content I am not following what you mean exactly ? Forgive me I am a newbie.
-
April 23rd, 2007, 12:46 PM
#6
Re: onclick event problem urgent
if your code compiles, then view it in a browser. Then view source, find the HTML that is produced from the code you showed above, and paste that piece of HTML.
-
April 23rd, 2007, 01:53 PM
#7
Re: onclick event problem urgent
Nowhere in the code that you pasted does the text "misip249" appear, which means the important part isn't there. Try again
-
April 23rd, 2007, 02:26 PM
#8
Re: onclick event problem urgent
Last edited by superstarprogammer; May 8th, 2007 at 03:33 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|