Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. What is wrong in the Javascript

What is wrong in the Javascript

Scheduled Pinned Locked Moved ASP.NET
questionjavascriptdockerhelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kurian_Kurian
    wrote on last edited by
    #1

    I want to show a popup window on while clicking a link button .i want to pass the url of the popup window and also the id of each record while Databinding.the code which i used as follows. Javascript as follows function openWindow(url) { window.open(url,'Calendar', 'width=500,height=400,left=200,top=250'); } Link Button Postbackurl Code as follows PostBackUrl="javascript:openWindow('<%# Concatcolumns("UserDetails.aspx?id=",DataBinder.Eval(Container.DataItem,"ID"))%>');">LinkButton Concatcolumns Function as follows public static string Concatcolumns(object obj1, object obj2) { return Convert.ToString(obj1) + Convert.ToString(obj2); } My Javascript code and Concatcolumns functions are correct only problem in my Postbackurl code.what is wrong in that.while page loading i want to bind each record id along with the popup window javascript.

    T G 2 Replies Last reply
    0
    • K Kurian_Kurian

      I want to show a popup window on while clicking a link button .i want to pass the url of the popup window and also the id of each record while Databinding.the code which i used as follows. Javascript as follows function openWindow(url) { window.open(url,'Calendar', 'width=500,height=400,left=200,top=250'); } Link Button Postbackurl Code as follows PostBackUrl="javascript:openWindow('<%# Concatcolumns("UserDetails.aspx?id=",DataBinder.Eval(Container.DataItem,"ID"))%>');">LinkButton Concatcolumns Function as follows public static string Concatcolumns(object obj1, object obj2) { return Convert.ToString(obj1) + Convert.ToString(obj2); } My Javascript code and Concatcolumns functions are correct only problem in my Postbackurl code.what is wrong in that.while page loading i want to bind each record id along with the popup window javascript.

      T Offline
      T Offline
      thomas_joyee
      wrote on last edited by
      #2

      Every thing seems ok. May be the PostBackUrl property makes the problem. Try an 'a' tag instead of LinkButton.

      Thomas

      1 Reply Last reply
      0
      • K Kurian_Kurian

        I want to show a popup window on while clicking a link button .i want to pass the url of the popup window and also the id of each record while Databinding.the code which i used as follows. Javascript as follows function openWindow(url) { window.open(url,'Calendar', 'width=500,height=400,left=200,top=250'); } Link Button Postbackurl Code as follows PostBackUrl="javascript:openWindow('<%# Concatcolumns("UserDetails.aspx?id=",DataBinder.Eval(Container.DataItem,"ID"))%>');">LinkButton Concatcolumns Function as follows public static string Concatcolumns(object obj1, object obj2) { return Convert.ToString(obj1) + Convert.ToString(obj2); } My Javascript code and Concatcolumns functions are correct only problem in my Postbackurl code.what is wrong in that.while page loading i want to bind each record id along with the popup window javascript.

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        What does the generated code look like? Why do you concat the url using server code, when you can just as well put it in the markup code: PostBackUrl="javascript:openWindow('UserDetails.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>');"

        --- single minded; short sighted; long gone;

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups