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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. ASP.NET
  4. Request.QueryString value in popup

Request.QueryString value in popup

Scheduled Pinned Locked Moved ASP.NET
javascriptquestion
9 Posts 2 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.
  • J Offline
    J Offline
    just4ulove7
    wrote on last edited by
    #1

    Hi, How can I get a Request.QueryString value in a popup, through javascript... Thanks

    G 1 Reply Last reply
    0
    • J just4ulove7

      Hi, How can I get a Request.QueryString value in a popup, through javascript... Thanks

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

      Like this: Javascript : querystring[^] --- b { font-weight: normal; }

      J 1 Reply Last reply
      0
      • G Guffa

        Like this: Javascript : querystring[^] --- b { font-weight: normal; }

        J Offline
        J Offline
        just4ulove7
        wrote on last edited by
        #3

        Sorry.. I didnt get much from that code.. What I want to do is... I have a Calendar (in html), which is opened thru a popup... I am passing textbox name to the popup thru a query string... function fn_Select() { //var txtbox='txtActEndDate'; var txtbox=document.demoForms.dateField2.value; //eval("window.opener.document.CreateTasks." + txtbox).value=document.demoForm.Hidden1.value; eval("window.opener.document.CreateTasks." + ["<%=FldName% >"]).value=document.demoForm.Hidden1.value; } demoForms- Formname of the popup... dateField2 - txtbox in the popup... CreateTasks-Parent form name.. Trying to get the querystring.. in FldName... If I uncomment the commented line, it sets the value in the parent page textbox... But I m not getting the name of the Textbox in the Query string.... i.e. what i was trying to do in eval (...... Thanks

        G 1 Reply Last reply
        0
        • J just4ulove7

          Sorry.. I didnt get much from that code.. What I want to do is... I have a Calendar (in html), which is opened thru a popup... I am passing textbox name to the popup thru a query string... function fn_Select() { //var txtbox='txtActEndDate'; var txtbox=document.demoForms.dateField2.value; //eval("window.opener.document.CreateTasks." + txtbox).value=document.demoForm.Hidden1.value; eval("window.opener.document.CreateTasks." + ["<%=FldName% >"]).value=document.demoForm.Hidden1.value; } demoForms- Formname of the popup... dateField2 - txtbox in the popup... CreateTasks-Parent form name.. Trying to get the querystring.. in FldName... If I uncomment the commented line, it sets the value in the parent page textbox... But I m not getting the name of the Textbox in the Query string.... i.e. what i was trying to do in eval (...... Thanks

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

          Have you put the value from the querystring in the FldName variable? Why do you put the value in an array? Why do you use eval? Use demoForms instead of demoForm. window.opener.document.CreateTasks.<%=FldName% >.value=document.demoForms.Hidden1.value; --- b { font-weight: normal; }

          J 1 Reply Last reply
          0
          • G Guffa

            Have you put the value from the querystring in the FldName variable? Why do you put the value in an array? Why do you use eval? Use demoForms instead of demoForm. window.opener.document.CreateTasks.<%=FldName% >.value=document.demoForms.Hidden1.value; --- b { font-weight: normal; }

            J Offline
            J Offline
            just4ulove7
            wrote on last edited by
            #5

            FldName is the QueryString variable that I am trying to access through javascript.(It is passed from parent page) eval("window.opener.document.CreateTasks." + ["<%=FldName% >"]).value=document.demoForm.Hidden1.value; I am using eval, to build the script say ... Fldname contains the textfield name... it wl build to window.opener.document.CreateTasks.textFieldName.value= ..... But I am not able to access FldName i.e. QueryString value... Now, as per u said.. I changed my code to window.opener.document.CreateTasks.<%=FldName%>.value=document.demoForm.Hidden1.value; But still its not working... Thanks

            G 1 Reply Last reply
            0
            • J just4ulove7

              FldName is the QueryString variable that I am trying to access through javascript.(It is passed from parent page) eval("window.opener.document.CreateTasks." + ["<%=FldName% >"]).value=document.demoForm.Hidden1.value; I am using eval, to build the script say ... Fldname contains the textfield name... it wl build to window.opener.document.CreateTasks.textFieldName.value= ..... But I am not able to access FldName i.e. QueryString value... Now, as per u said.. I changed my code to window.opener.document.CreateTasks.<%=FldName%>.value=document.demoForm.Hidden1.value; But still its not working... Thanks

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

              You mean that you have a querystring with the key FldName? You don't have an asp variable with the name FldName? Why are you using the asp variable then? Is it an asp or asp.net page at all? Or are you just using the <%%> tags by mistake? --- b { font-weight: normal; }

              J 1 Reply Last reply
              0
              • G Guffa

                You mean that you have a querystring with the key FldName? You don't have an asp variable with the name FldName? Why are you using the asp variable then? Is it an asp or asp.net page at all? Or are you just using the <%%> tags by mistake? --- b { font-weight: normal; }

                J Offline
                J Offline
                just4ulove7
                wrote on last edited by
                #7

                Yes, Basically I am not sure how to do this.. My parent form is aspx page... and the Calendar page is a html page in which I am trying to access the QueryString.. How to do it? Thanks

                G 1 Reply Last reply
                0
                • J just4ulove7

                  Yes, Basically I am not sure how to do this.. My parent form is aspx page... and the Calendar page is a html page in which I am trying to access the QueryString.. How to do it? Thanks

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

                  Use the javascript function i linked to before. window.opener.document.CreateTasks[querystring('FldName')].value=document.demoForms.Hidden1.value; --- b { font-weight: normal; }

                  J 1 Reply Last reply
                  0
                  • G Guffa

                    Use the javascript function i linked to before. window.opener.document.CreateTasks[querystring('FldName')].value=document.demoForms.Hidden1.value; --- b { font-weight: normal; }

                    J Offline
                    J Offline
                    just4ulove7
                    wrote on last edited by
                    #9

                    Thanks a lot, its working fine...

                    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