Results 1 to 9 of 9

Thread: image control on click

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    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&amp;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&amp;id=22', 'child', 'scrollbars,width=650,height=600--> return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$ctl00&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" style="height:45px;width:45px;border-width:0px;" />&nbsp;<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&amp;id=48', 'child', 'scrollbars,width=650,height=600--> return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$ctl02&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" style="height:45px;width:45px;border-width:0px;" />&nbsp;</div>

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  3. #3
    Hyperactive Member dnanetwork's Avatar
    Join Date
    Oct 2007
    Location
    Mumbai
    Posts
    349

    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.

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    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");

  5. #5
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    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&amp;id=22', 'child', 'scrollbars,width=650,height=600--> return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$ctl00&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" style="height:45px;width:45px;border-width:0px;" />

  7. #7
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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&amp;id=22', 'child', 'scrollbars,width=650,height=600--> return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ContentPlaceHolder1$ctl00&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" style="height:45px;width:45px;border-width:0px;" />
    What is going on with the part I have marked in bold?

    Gary

  8. #8

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    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?

  9. #9
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    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
  •  



Click Here to Expand Forum to Full Width