popups in I.E. not working
Question:
Why does this popup work in Firefox and not in I.E.? I’ve checked the settings and I’m not blocking pop-ups.
Code Snippet:
<%@LANGUAGE=”VBSCRIPT” CODEPAGE=”65001″%>
<% option explicit %>
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=”http://www.w3.org/1999/xhtml”>
<head>
<!–#include file=”aspajax.asp”–>
<%
‘ASPAjax.Path=”/aspajax/”
ASPAjax.Open() ‘ Set up ASPajax
%>
<title>ASP AJAX form processing and validation tuturial.</title>
<link href=”SampleContent/CSS/main.css” rel=”stylesheet” type=”text/css” />
</head>
<body>
<%
‘ Create an UpdatePanel to AJAX enable the entire form automatically.
Dim myPanel
Set myPanel = ASPAjax.CreateUpdatePanel
myPanel.Id = “VALIDATION_FORM”
myPanel.Open
Dim Message1 , Message2 ‘, Message
%>
<%
If Request.Form(“submit”)<>”" And ValidateForm() then ‘process form %>
<h1> Thanks for your submission</h1>
<% else %>
<form method=”post” action=”">
<label for=”search”>Searching for:</label>
<input type=”search” name=”search” id=”search” value=”<%=Request.Form(“search”)%>” />
<br />
<label for=”range”>Quantity:</label>
<input type=”quantity” name=”quantity” id=”quantity” value=”<%=Request.Form(“quantity”)%>” />
<br />
<label for=”range”>Price range:</label>
<input type=”range” name=”range” id=”range” value=”<%=Request.Form(“range”)%>” />
<br />
<label for=”email” >Email:</label>
<input type=”text” name=”email” id=”email” value=”<%=Request.Form(“email”)%>” />
<%=Message1%><br />
<label for=”email2″ >Confirm Email:</label>
<input type=”text” name=”email2″ id=”email2″ value=”<%=Request.Form(“email2″)%>”/>
<%=Message2%><br />
<br />
<input type=”submit” value=”Submit” name=”submit” />
</form>
<% end if %>
<%
myPanel.Close ‘clean up
Set myPanel = nothing
%>
<br>
<p>
<font size=3 face=Arial><b>We have many products and custom chocolate<br>shapes and etchings that are not on the web site.<br>
<br><br>Let us know what you are searching for and <br>if we can provide it, we will contact you with details.
<br><br><br>We will work with you to match your price range.
</b></font>
</p>
</body>
</html>
<% ASPAjax.Close() ‘ Close up ASPajax at the end of all HTML%>
<%
Function ValidateForm
Dim Valid
If Request.Form(“submit”)<>”" then
Valid = true
if not isValidEmail (Request.Form(“email”)) then Message1 = “<em>* Please Enter a Valid Email Address</em>” : Valid = False
if LCASE(Request.Form(“email”)) <> LCASE(Request.Form(“email2″)) then Message2 = “<em>* Email Addresses do not Match</em>”: Valid = False
End If
ValidateForm = Valid
End Function
‘ Helper Functions for the form
Function isValidEmail(myEmail)
dim isValidE
dim regEx
isValidE = True
set regEx = New RegExp
regEx.IgnoreCase = False
regEx.Pattern = “^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$”
isValidE = regEx.Test(myEmail)
isValidEmail = isValidE
End Function
%>
Then in the first asp I have:
<head>
<SCRIPT language=”JavaScript1.2″>
function init()
{
newwin = window.open(“Chocolate_Expressions_Survey.asp”,”Chocolate Expressions Help Form”,”width=350,height=350,screenX=200,screenY=200,top=200,left=200,scrollbars=no,resizable=no”);
}
</script>
</head>
<body onunLoad=”javascript: init();”>
Solution:
newwin = window.open(“Chocolate_Expressions_Survey.asp”,”Chocolate Expressions Help Form”,”width=350,height=350,screenX=200,screenY=200,top=200,left=200,scrollbars=no,resizable=no”);
here the second argument is
Chocolate Expressions Help Form which is invalid syntax, The argument can contain alpha numeric characters and underscore.
try with Chocolate_Expressions_Help_Form













Comments (0)
Trackbacks - Pingbacks (0)
Leave a Reply