I'm a photographer and have a java based access code for clients to login and see the shoots I have done for them. The page used to function fine until I tried to update the page to a new aesthetic and have had all manner of issues since then.
The idea is someone clicks through to the 'clients login' page where this code is and they see a text box and a button to submit the form. It then brings up a popup window where the url is hidden (just to make things look neater and enforce the need for the code..).
This is the script code:
Expand|Select|Wrap|Line Numbers
- <script>
- <!--
- function makeJumpWindow()
- {
- var jumpWindow = null
- var a = '/index.html';
- var b = 'studios/';
- var code = document.myForm.field2.value;
- if (!jumpWindow || jumpWindow.closed){
- jumpWindow = window.open((b + code + a), "PhotosWindowm", "scrollbars=1, height = 768, width = 1024, status=no, resizable=yes")
- jumpWindow.moveTo(0, 0)
- } else {
- jumpWindow.focus()
- }
- }
- function closeWindow() {
- if (jumpWindow) {
- jumpWindow.close()}
- }
- -->
- </script>
Expand|Select|Wrap|Line Numbers
- <div style="left: 380px; top: 244px; width: 161px; position:absolute">
- <form name= 'myForm' action = 'javascript:makeJumpWindow'>
- <p align="center"><input type= 'text' name= 'field2'>
- <a href="javascript:makeJumpWindow()"><img src="studio_access_files/Screen%20shot%202010-09-09%20at%2012.07.21.jpg" alt="" style="border: none; height: 41px; width: 161px; " /></a>
- </form>
- </div>
The Problem
I'm designing on a mac and this works perfectly well in Safari, Camino and Firefox... even the mac Internet Explorer form '05 shows it fine yet IE on a PC doesn't display the text box.. why not?!
If you click on the button it brings up some error thing at the bottom of the window and if clicked on it says "null or not an object" or some such..
I managed to get it working by removing the 'document' bit of my 'document.myForm.field2.value;' in the script but this means it no longer works in any Mozilla browsers..
I have spent all day on this and my eyeballs are bleeding and I'm crying tears of blood into my keyboard as we speak... can anyone help me?
I've tried to include as much information as I can, if I've left anything out please let me know..
Thanks,
Finn