Click to See Complete Forum and Search --> : Popup Creator
I am trying to make a custom popup creator using javascript but i cant seem to get it to work. The popup creator is at jr.marlintinicharters.com/popupmaker.html
Any suggestions on why its not working?
Thanks, Josh
Here's the code, fixed up...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
function popupGen() {
popnameval = document.popup.popname.value ;
heightval = document.popup.height.value ;
widthval = document.popup.width.value ;
urlval = document.popup.url.value ;
linknameval = document.popup.linkname.value ;
document.getElementById("output").innerHTML = "Place this where you want the link to be on your web page:<br>";
document.getElementById("output").innerHTML += "<a href=\"" + urlval + "\" onclick=\"window.open(this.href,'" + popnameval + "','toolbar=no,status=no,width=" + widthval + ",height=" + heightval + "'); return false;\">" + linknameval + "</a>";
}
</script>
</head>
<body>
<h1>Popup Creator</h1>
<form name="popup">
<table border="0">
<tr>
<td>Name of popup:</td>
<td><input type="text" name="popname" length="8" value=""></td>
</tr>
<tr>
<td>Height:</td>
<td><input type="text" name="height" length="8" value=""></td>
</tr>
<tr>
<td>Width:</td>
<td><input type="text" name="width" length="8" value=""></td>
</tr>
<tr>
<td>Url of the web page to put<br>
in the popup (write inside ""):</td>
<td><input type="text" name="url" length="8" value=""></td>
</tr>
<tr>
<td>Name of the link
to the popup:</td>
<td><input type="text" name="linkname" length="8" value=""></td>
</tr>
</table>
<p><input type="button" value="Create Code" onclick="popupGen();"></p>
</form>
<p>The code will be shown below:</p>
<pre id="output"></pre>
</body>
</html>
Thank You! :D
One more thing,
I wanted to put this in my script:
// (c) Copyright JR Business Publications JR.Marlintinicharters.com
// Created by Josh Roy
But now that wouldn't be rigth because you helped fix it right? i was wondering if i could still put that in it?
If you don't want me too then i wont just say so.
Thanks again, Josh
Also i tought there had to be ' ' s around each thing i.e. 'height=54' ?
just wondering because i noticed that there wasn't any around some of them
You may go ahead and add the copyright info in, but I would appreciate if you would state that the script was created with help from Infinity Web Design, if you would...
Ok thanks again for your help, i must have asked about 25 people and posted it on two other forums but no one could help me
I was happy to help... :)
Also i tought there had to be ' ' s around each thing i.e. 'height=54' ?
just wondering because i noticed that there wasn't any around some of them
No, they actually can't be around them... :) They need to be around all the properties collectivly, but not individually.
ashieddie
09-17-2003, 10:08 PM
i'm still new in development world...but i hope that you guys can give me some favour!
actually i need to customize some webmail in lotus notes web mail and the only way to do this is by useing javascript.
i've looked into the coding but what i want to know is how is it possible for me to enable the popup at the web mail?? should i specify the database extension/path? really i m not so sure how to do this
here are some sample of coding...
If dbsize > dbmax Then
Print {<script language="JavaScript">} Print {window.open("/mail/names.nsf/Memo?openform",'window2','resizable=no,width=600,height=400,scrollbars')}
Print {history.go(-1)}
Print {</script>}
Else
Print {<script language="JavaScript">}
Print {window.alert(" Your Mail Database has Exceed it's Quota !! Please Delete or Archive Old Message(s). Thank You")}
Print {history.go(-1)}
Print {</script>}