popup in asp.net using javascript

C

csgraham74

Hopefully someone can help me with this i dont seem to be able to find
a javascript - asp.net group.

im trying to creat a modal dialog box in asp.net using the following

Dim str_JavaPopup As String = "<script language" &
"='javascript'>window.showModalDialog('frm_MoreInfo.aspx?ProductImage="
& str_ImageName & "&ProductDesc=" & str_Description & "','dialogWidth:
100px;dialogHeight: 100px;center: yes;resize: no;status: no;help:
no');</Script>"

Me.Page.RegisterStartupScript("Startup", str_JavaPopup)

the window opens fine but the window does not resize

is my code ok??

thanks in advance
 
M

Mythran

csgraham74 said:
Hopefully someone can help me with this i dont seem to be able to find
a javascript - asp.net group.

im trying to creat a modal dialog box in asp.net using the following

Dim str_JavaPopup As String = "<script language" &
"='javascript'>window.showModalDialog('frm_MoreInfo.aspx?ProductImage="
& str_ImageName & "&ProductDesc=" & str_Description & "','dialogWidth:
100px;dialogHeight: 100px;center: yes;resize: no;status: no;help:
no');</Script>"

Me.Page.RegisterStartupScript("Startup", str_JavaPopup)

the window opens fine but the window does not resize

is my code ok??

thanks in advance

I believe showModalDialog's option parameter is supposed to be a
comma-delimited list of options...not semicolon.

Mythran
 
M

Mythran

Mythran said:
I believe showModalDialog's option parameter is supposed to be a
comma-delimited list of options...not semicolon.

Mythran

Ok, I double-checked and the semi-colon is the delimiter and not a comma so
ignore my last post...because of that, I did some testing and found that you
are specifying your options as the wrong parameter....so..

Correct Way:
window.showModalDialog("url", "window name", "options delimited by
semi-colon");

What you are doing:
window.showModalDialog("url", "options delimited by semi-color");

your options are being passed as the window name :)

Mythran
 
E

Eliyahu Goldin

Pass an empty string as the second parameter and specify resizabe:yes in the
third parameter.

Eliyahu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top