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. Javascript in codebehind problem

Javascript in codebehind problem

Scheduled Pinned Locked Moved ASP.NET
helpcsharpjavascript
4 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.
  • R Offline
    R Offline
    RvrBndBrewer
    wrote on last edited by
    #1

    I sure hope someone can help me with this frustrationg, and seamingly simple, problem. I am trying to create a modal dialog for a user to enter a password of sorts ( a 4 digit PIN #). My attempt to create the pop up isn't working and I get the error, "Microsoft JScript runtime error: Object doesn't support this property or method" I am calling a sub in my VB.NET codebehind like this: Private Sub ValidatePIN() Dim sURL As String Dim sScript As String sURL = "http://localhost/OASIS/AppModules/PinEntry.aspx" sScript = "" sScript &= "window.ShowModalDialog(" & Chr(34) & sURL & Chr(34) & ",'window','');" sScript &= "" Response.Write(sScript) End Sub It seems to be something in my syntax as the following test works: Private Sub ValidatePIN() Dim sScript As String sScript = "" sScript &= "window.alert(" & Chr(34) & "Hello World" & Chr(34) & ");" sScript &= "" Response.Write(sScript) End Sub Thank you. Pat Reddy

    C 1 Reply Last reply
    0
    • R RvrBndBrewer

      I sure hope someone can help me with this frustrationg, and seamingly simple, problem. I am trying to create a modal dialog for a user to enter a password of sorts ( a 4 digit PIN #). My attempt to create the pop up isn't working and I get the error, "Microsoft JScript runtime error: Object doesn't support this property or method" I am calling a sub in my VB.NET codebehind like this: Private Sub ValidatePIN() Dim sURL As String Dim sScript As String sURL = "http://localhost/OASIS/AppModules/PinEntry.aspx" sScript = "" sScript &= "window.ShowModalDialog(" & Chr(34) & sURL & Chr(34) & ",'window','');" sScript &= "" Response.Write(sScript) End Sub It seems to be something in my syntax as the following test works: Private Sub ValidatePIN() Dim sScript As String sScript = "" sScript &= "window.alert(" & Chr(34) & "Hello World" & Chr(34) & ");" sScript &= "" Response.Write(sScript) End Sub Thank you. Pat Reddy

      C Offline
      C Offline
      Chodici Mrkev
      wrote on last edited by
      #2

      Hi, I want to solve the same problem. - I need a modal dialog for user, who must type in the username and password. - But I haven't a clue how can I get back the data from the user to my variable? Could you help me?

      R 1 Reply Last reply
      0
      • C Chodici Mrkev

        Hi, I want to solve the same problem. - I need a modal dialog for user, who must type in the username and password. - But I haven't a clue how can I get back the data from the user to my variable? Could you help me?

        R Offline
        R Offline
        RvrBndBrewer
        wrote on last edited by
        #3

        There is a way to call ShowModalDialog with a variable list of sorts that can be returned to teh calling page. Google "window.ShowModalDialog" and you should find an answer.

        C 1 Reply Last reply
        0
        • R RvrBndBrewer

          There is a way to call ShowModalDialog with a variable list of sorts that can be returned to teh calling page. Google "window.ShowModalDialog" and you should find an answer.

          C Offline
          C Offline
          Chodici Mrkev
          wrote on last edited by
          #4

          Hi, thanks for your answer, I'll try it. Meanwhile, I found ShowModalDialog method in msdn, there's a feature, which allows you to create the code automatically, maybe it could help you. http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/showmodaldialog.asp http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/showModalDialog.htm

          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