jscript alternatives
my gfx person wants javascript roll overs. this causes a slight issue in submit buttons for forms. which gets complicated by the fact that M$IE seems to be responding to getElementById in some cases (something it shouldnt do since it doesnt have it).
http://www.findyourdesire.com/forums.php?tid=225 talks about the login issue and this thread: http://forums.devnetwork.net/viewtopic.php?t=23434 gave me a work around. the problem is i dont think internet error works with the document.all[] array. because reworking all the fucntions to use the fix gave something like:
function getElem(id) { return (document.getElementById ? document.getElementById(id) : document.all[id]); } // fix for internet error
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; getElem(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++; getElem(choice).src=rolls[i].src; return true; }
}
function subfrm(choice){ getElem(choice).submit(); return true; } // submit a form
function subsel(form,hfld,hval,hfld2,hval2){ // submit a form and set a hidden variable
getElem(hfld).value=hval;
getElem(hfld2).value=hval2;
getElem(form).submit();
return true;
}
does internet error not understand the DOM???
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
m3rajk posted this at 16:14 — 5th July 2004.
They have: 461 posts
Joined: Jul 2003
anyone have any suggestions for me on how to get microsoft internet error to submit the forms?
m3rajk posted this at 16:39 — 5th July 2004.
They have: 461 posts
Joined: Jul 2003
i just realized all the buttons in hotmail are rollovers, which means that this MUST be possible in ie. i'm going to look at that source. if someone knows how, bplease feel free to save me a headache and explain it
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
m3rajk posted this at 16:47 — 5th July 2004.
They have: 461 posts
Joined: Jul 2003
example from hotmail....
the save button.....
<td class="P" nowrap onmouseover="MO()" onmouseout="MU()" onclick="Mail('Save')"><img src="http://64.4.55.45/i.p.folder.drafts.gif" border=0 align=absmiddle hspace=1 alt="Drafts"> Save Draft</td>
'and from farther down the page....
</form>
<script language="JavaScript">
var frm = document.composeform;
var BccB = document.all.ButtonBcc;
function Save()
{
var bSbmt = true;
if (bSbmt)
{
frm._HMaction.value="Save";
frm.submit();
}
}
and damn. the entire page has only one form.
POSIX. because a stable os that doesn't have memory leaks and isn't buggy is always good.
m3rajk posted this at 17:37 — 5th July 2004.
They have: 461 posts
Joined: Jul 2003
i cant do one form. some things need GET. others need POST
Vincent Puglia posted this at 00:55 — 8th July 2004.
They have: 634 posts
Joined: Dec 1999
Hi,
1) document.all is primarily an IE4 thingy (IE5+ uses it in backward compatibility mode; all version 5+ browsers use document.getElementById)
2) you can change the method programmatically, see:
http://members.aol.com/grassblad/html/searchForm.html
Vinny
Where the world once stood
the blades of grass cut me still
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.