Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Nov 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem with my HyperlinkUrl parameter

    Hi everyone, I have a problem with my HyperlinkUrl. I am trying to send this parameter

    <%# DataBinder.Eval(Container.DataItem, "Name")%>

    to my javascript function.

    This works: NavigateUrl='JavaScriptpenPopup("largerImage.aspx?name=Airbrushing")'

    This does not work:

    NavigateUrl='JavaScriptpenPopup("largerImage.aspx?name=<%# DataBinder.Eval(Container.DataItem, "Name")%> ")'

    I can’t figure out the difference. I am a beginner so I can’t figure out what to do to solve it. Please help.

    AlexanderBlade

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    It's an embedded quotes issue. You have double quotes twice inside each other, so it doesn't know what you really meant.

    (use the BB code CODE button so it formats your code nicely when you post code)

    Try this:
    Code:
    NavigateUrl='JavaScript:OpenPopup("largerImage.aspx?name=<%# DataBinder.Eval(Container.DataItem, \"Name\")%> ")'
    Or this
    Code:
    NavigateUrl='JavaScript:OpenPopup("largerImage.aspx?name='+<%# DataBinder.Eval(Container.DataItem, "Name")%>+' ")'

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    New Coder
    Join Date
    Nov 2006
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, I tried the first one it worked fine. Thank you so much!

    One more question. You mentioned a BB code CODE button. Where do I find it and do you know if there is a sight that may show me how to use it?

    Thank you so much for helping me. I’ve been trying to find a solution for this problem for at least one month.

    Thanks again!

  • #4
    $object->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Jun 2003
    Posts
    3,100
    Thanks
    2
    Thanked 23 Times in 23 Posts
    Quote Originally Posted by AlexanderBlade View Post
    One more question. You mentioned a BB code CODE button. Where do I find it and do you know if there is a sight that may show me how to use it?
    BB code buttons are above the message reply dialog box. The one you want to pay closest attention to is the # icon, which encloses code within code tags and sets it apart from the rest of your post.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    SNAP to it!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •