0

Hello community,
I was really hoping to get some guidance on a little issue I'm having. I am in the process of building a site for my aunt, I'm mostly self taught and plugging away at building out my first multi page site.
Alas I have encountered a problem:
I need a splash page to popup when you click on the "store" link and have you either enter a zip or postal code. If a valid zip is entered you are ported to the US prices page, and if a valid Postal code is entered you are ported to the Canadian prices.

Any help or direction would be life saving thank you so much!

-Paul

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by Cold Shot
0

For popup:

<a href="javascript:void(0)" onclick="window.open(''filename.html','popupWindow','height=500,width=600,left=30,top=40,toolbar=no,location=no,status=no,menubar=no,scrollbars=no');">Click</a>

and for popup window something like this:

<script type="text/javascript">
function checkCode(){
code=document.getElementById('code').value;
if(code!=""){
//here check the for the code and then add something like this:
window.opener.location.href="filename.html?page="+page
window.close();
}
}
</script>
Your postal code: <input type="text" name="code" id="code"><input type="button" value="Click" onclick="checkCode()">

And then you still have to add PHP code to you filename.html page (filename.php) for checking what page will be opened (change filename.html to filename.php). Something like this:

<?php
$page=$_GET['page'];
if($page!=""){
if($page=="page name") header("location:page url");
else header("location:other page...");
}
?>

Edited by ivan3510: n/a

0

Wow thanks so much for the help.
I think after I throw in some lines to make it pretty, and the company logo it should be looking sweet!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.