javascript rollover submits

They have: 461 posts

Joined: Jul 2003

i have them in all but the main (alix version) of a site.. development base can be found here: http://24.91.157.113/findyourdesire/

problem is that while mozilla, netscape and such have it work fine.

however. M$IE fails to do anything with the javascript.

this is a problem since most people have been assimilated by the M$

here's the function i call to do the submit

function subfrm(choice){ document.getElementById(choice).submit(); return true; } // submit a form
'

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

They have: 461 posts

Joined: Jul 2003

ok. this seems to be something that's intermittent at best...

http://www.findyourdesire.com/forums.php?tid=225

as i state there, in any of the submits using an image, M$IE 4.x on Win 95 and M$IE 6.x on win xp pro seems to fail

obviously this is a massive problem on some pages since the javascript submit on some sets one or two hidden variables.

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Point me to a form which fails. I don't know which version of the site to look in or where the problem area is.

They have: 461 posts

Joined: Jul 2003

right now findyourdesire.com has the version that fails.

try using the find user button. that one works, but the login one does not.

go to the login page. same thing.

any page that has a form other than the quicksearch in the navigation bar fails in internet explorer.

problem is that the forums require certain hidden variables to be set, thus the need for the javascript functions.

ok. so some playing proves it only dislikes logging in.

yet it calls the function like the others do. it doesnt like it on login.php nor index.php.
and only in internet error

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

They have: 461 posts

Joined: Jul 2003

sometimes answers appear when seemingly dumb questions are asked, so here goes nothing....
i believe that most use the relative url "page.php" rather than the full url... could that be the problem for M$ internet error? (aka M$ internet evil)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <meta name="Author" content="Pages coded by Josh Perlmutter for Desired Creations LLC">
    <meta name="Author" content="Graphics created by ?  for Desired Creations LLC">
    <meta name="Author" content="Smileys created by ? for Desired Creations LLC">
    <meta name="Description" content="A feature-rich site combining elements of Rating, Matching, Dating and Journal/Blog sites.">
    <meta name="Keywords" content="rate me,rate pictures, rate photos, rate bodies, rate girls, rate women, rate ladies, rate men, rate boys, rate people, rate teens, date me, date people, find dates, match people, sexy singles, singles, couples, desire, body, pictures, photos, photographs, journal, blog, man, woman, female, male, girl, boy, ratemybody, find, chat, talk, forums, facethejury, beautiful girls, beautiful women, handsome men, cute girls, cute guys, sexy girls, face the jury, hot, sexy, appealing, hotornot, sexy guys, rate my face, sexy men, hot men, hot women, sexy women, hot or not, cute, adorable, cutemeter, hot girls, hot chicks, cute meter, face, breasts, eyes, ratemyface, rate faces, rate bodies, rate legs, rate breasts, rate women, rate men, rate ears, rate feet, rate bellys, rate my face, legs, chests, want, lust, live journal, livejournal, web log, dead journal, deadjournal, web journal, rate my body,">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>FindYourDesire.com -- Homepage of FindYourDesire.com</title>
    <style type="text/css">
      <!--
     @import url(textStyle.css);
      -->
    </style>
    &lt;script type="text/javascript"&gt;
      <!--
var usr=new Array('chat','control','faq','finduser','forums','login','logout','newm','search','signup','top','lgn');
var rolls=new Array(); // empty image array
var pretxt='sitepics/'; var endtxt='.png'; var ind;// variables used to preload

function preload(bttn){ // preload images
  end=bttn.length; // find array size
  for(i=0;i<end;++i){ // for each picture
    ind=i*2;
    rolls[ind]= new Image();
    rolls[ind].src=pretxt+bttn[i]+'on'+endtxt;
    rolls[++ind]= new Image();
    rolls[ind].src=pretxt+bttn[i]+'off'+endtxt;
  }
}
function selopt(choice,bttn){ // mouseover highlight
  var i;
  for(i=0;((i<bttn.length)&&(bttn[i]!=choice));i++);
  if(i==bttn.length){ return false; } else{ i*=2; document.getElementById(choice).src=rolls[i].src; return true; }
}
function deselopt(choice,bttn){ // mouseout return to load state
  var i;
  for(i=0;((i<bttn.length)&&(bttn[i]!=choice));i++);
  if(i==bttn.length){ return false; } else{ i*=2; i++; document.getElementById(choice).src=rolls[i].src; return true; }
}
function subfrm(choice){ document.getElementById(choice).submit(); return true; } // submit a form
preload(usr);
      -->
    &lt;/script&gt;
  </head>
  <body class="regbod">    <!-- nav bar-->
    <form action="profile.php" id="qsearch" name="qsearch" target="_top">
      <table cellspacing="0" class="regw750">
<tbody>
  <tr>
    <td rowspan="3"><a href="index.php" target="_top"><img alt="Home" src="sitepics/logo.png" title="Home" /></a></td>
    <td><a href="login.php" onmouseout="deselopt('login',usr);" onmouseover="selopt('login',usr);" target="_top"><img alt="Login!" id="login" name="login" src="sitepics/loginoff.png" title="Login!" /></a></td>
    <td><a href="http://chat.findyourdesire.com/index.php?nick=" onmouseout="deselopt('chat',usr);" onmouseover="selopt('chat',usr);" target="_top"><img alt="Chat" id="chat" name="chat" src="sitepics/chatoff.png" title="Chat" /></a></td>
    <td><a href="faq.php?seek=all" onmouseout="deselopt('faq',usr);" onmouseover="selopt('faq',usr);" target="_top"><img alt="FAQ and TOS" id="faq" name="faq" src="sitepics/faqoff.png" title="FAQ and TOS" /></a></td>
    <td><a href="new.php?gen=all" onmouseout="deselopt('newm',usr);" onmouseover="selopt('newm',usr);" target="_top"><img alt="Newest Members" id="newm" name="newm" src="sitepics/newmoff.png" title="Newest Members" /></a></td>
  </tr>
  <tr>
    <td><a href="join.php" onmouseout="deselopt('signup',usr);" onmouseover="selopt('signup',usr);" target="_top"><img alt="Sign Up!" id="signup" name="signup" src="sitepics/signupoff.png" title="Sign Up!" /></a></td>
    <td><a href="search.php" onmouseout="deselopt('search',usr);" onmouseover="selopt('search',usr);" target="_top"><img alt="Search" id="search" name="search" src="sitepics/searchoff.png" title="Search" /></a></td>
    <td><a href="forums.php" onmouseout="deselopt('forums',usr);" onmouseover="selopt('forums',usr);" target="_top"><img alt="Forums" id="forums" name="forums" src="sitepics/forumsoff.png" title="Forums" /></a></td>
    <td><a href="top.php?gen=all" onmouseout="deselopt('top',usr);" onmouseover="selopt('top',usr);" target="_top"><img alt="Top Users" id="top" name="top" src="sitepics/topoff.png" title="Top Users" /></a></td>
  </tr>
  <tr>
    <td class="right" colspan="2"><input id="un" maxlength="15" name="un" size="11" type="text" /></td>
    <td colspan="2"><a href="#" onclick="subfrm('qsearch');" onmouseout="deselopt('finduser',usr);" onmouseover="selopt('finduser',usr);"><img alt="Quick Search" id="finduser" name="finduser" src="sitepics/finduseroff.png" title="Quick Search" /></a></td>
  </tr>
</tbody>
      </table>
    </form>
    <!-- /nav bar -->
    <p>Display issues? Click <a href="http://www.findyourdesire.com/faq.php?seek=quirks">here</a> for help. </p>
      <table cellspacing="0" class="regw750">
<tbody>
  <tr>
    <td class="center" colspan="3">
      <form action="http://www.findyourdesire.com/login.php" id="verify" name="verify" method="POST">
<span id="vtp">Member Name:&nbsp;<input id="mem" name="mem" maxlength="15" size="15" type="text" /> Password:&nbsp;<input id="pass" name="pass" maxlength="15" size="15" type="password" /></span> <a href="#" onclick="subfrm('verify');" onmouseout="deselopt('lgn',usr);" onmouseover="selopt('lgn',usr);" target="_top"><img alt="Login Now!" id="lgn" name="lgn" src="sitepics/lgnoff.png" title="Login Now!" /></a><span id="vtp"> or <a href="http://www.findyourdesire.com/join.php" target="_top">Join</a> now to Rate others!</span>
      </form>
    </td> 
'

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

They have: 461 posts

Joined: Jul 2003

just checked.
login.php uses $_SERVER['PHP_SELF'] which comes out as /login.php
the rest just use the page since it's relative. testing this theory by changing the index to login.php instead of $aurl/login.php
($aurl is a variable i have set in an include that is the absolute url so that i can modify some things that need it between the dev server and deployment server)

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

They have: 461 posts

Joined: Jul 2003

change made no difference

They have: 461 posts

Joined: Jul 2003

one of the ones with multiple submits doesnt use the same submission. on the other hand, one does. i see no difference between it's use in those ones that done work and here:
http://www.findyourdesire.com/forums.php?fid=2
where it does.
<a href="#" onclick="subfrm('nwthrd')"><img alt="Start a New Thread" onmouseout="this.src='./sitepics/nwthrdoff.png'; return true;" onmouseover="this.src='./sitepics/nwthrdon.png'; return true;" src="sitepics/nwthrdoff.png" title="Start a New Thread" /></a>'

POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.