|
-
Mar 13th, 2010, 06:36 PM
#1
Thread Starter
Frenzied Member
image control on click
Ok, this works great on my dev machine, but not working on godaddy.com. Every time I clicked on the image, the page is just loaded itself instead of going to the previewphoto.aspx page.
<img id="ctl00_ContentPlaceHolder1_ImgPhoto" class="ImgPhoto" onclick="<!--ow.open('../member/previewphoto.aspx?uid=676971b9-ca9e-463e-8b48-6b5d5b1b01c2&id=22', 'child', 'scrollbars,width=650,height=600--> return false" src="../Photos/../photos/UserLock.png" style="height:100px;width:100px;border-width:0px;" /><br /><br />
<div id="ctl00_ContentPlaceHolder1_divPhotos"><input type="image" name="ctl00$ContentPlaceHolder1$ctl00" src="../photos/UserLock.png" onclick="<!--ow.open('../member/previewphoto.aspx?uid=676971b9-ca9e-463e-8b48-6b5d5b1b01c2&id=22', 'child', 'scrollbars,width=650,height=600--> return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$ctl00", "", true, "", "", false, false))" style="height:45px;width:45px;border-width:0px;" /> <input type="image" name="ctl00$ContentPlaceHolder1$ctl02" src="../Photos/admin_IMG_1304rd.jpg" onclick="<!--ow.open('../member/previewphoto.aspx?uid=676971b9-ca9e-463e-8b48-6b5d5b1b01c2&id=48', 'child', 'scrollbars,width=650,height=600--> return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$ctl02", "", true, "", "", false, false))" style="height:45px;width:45px;border-width:0px;" /> </div>
-
Mar 14th, 2010, 05:16 AM
#2
Re: image control on click
Hey,
vbbit, can you go back and edit your post to include [CODE][/CODE], it would make it so much easier to read!!
Gary
-
Mar 14th, 2010, 07:58 AM
#3
Hyperactive Member
Re: image control on click
man u r code is complex..
just tell us wot do u want...
may be v can help..?
Last edited by dnanetwork; Mar 14th, 2010 at 08:02 AM.
-
Mar 14th, 2010, 06:38 PM
#4
Thread Starter
Frenzied Member
Re: image control on click
Sorry here is the code, and it gives me javascript error: 0 -
ImgPhoto.Attributes.Add("onclick", "window.open('../member/previewphoto.aspx?uid=" + photo.UIDs[0] + "&id=" + photo.IDs[0] + "', 'child', 'scrollbars,width=650,height=600'); return false");
-
Mar 15th, 2010, 03:49 AM
#5
Re: image control on click
Hey,
What is the end result of this on the client page.
Right click on the page, and view source, and look at the onclick attribute. Does it contain exactly what you expect? You should be able to take exactly what is there, and paste it into the address bar. Can you?
Gary
-
Mar 15th, 2010, 10:53 AM
#6
Thread Starter
Frenzied Member
Re: image control on click
Gary, this is what I see. It looks correct to me, not sure why it doesn't work in production on godaddy...
<input type="image" name="ctl00$ContentPlaceHolder1$ctl00" src="../photos/UserLock.png" onclick="<!--ow.open('../member/previewphoto.aspx?uid=676971b9-ca9e-463e-8b48-6b5d5b1b01c2&id=22', 'child', 'scrollbars,width=650,height=600--> return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$ctl00", "", true, "", "", false, false))" style="height:45px;width:45px;border-width:0px;" />
-
Mar 15th, 2010, 11:14 AM
#7
Re: image control on click
Hey,
Really?
It don't look right to me:
Code:
<input type="image" name="ctl00$ContentPlaceHolder1$ctl00" src="../photos/UserLock.png" onclick="<!--ow.open('../member/previewphoto.aspx?uid=676971b9-ca9e-463e-8b48-6b5d5b1b01c2&id=22', 'child', 'scrollbars,width=650,height=600--> return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("ctl00$ContentPlaceHolder1$ctl00", "", true, "", "", false, false))" style="height:45px;width:45px;border-width:0px;" />
What is going on with the part I have marked in bold?
Gary
-
Mar 15th, 2010, 02:25 PM
#8
Thread Starter
Frenzied Member
Re: image control on click
Oh yeah lol.. how come it's doing that when on Production server? It's working fine on my machine. It shows window.open in the source code, Gary. How can I resolve this?
-
Mar 15th, 2010, 03:37 PM
#9
Re: image control on click
Hey,
To be honest with you, I am not sure. For some reason, an XML Comment tag is being formed in the onclick attribute that is being rendered to the client. This could be something that GoDaddy is doing, but I don't see why they would have this.
What hosting account do you have with them?
You might want to contact their support team and ask this question.
Gary
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
|