Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HELP WITH FORM SUBMITTING WITH IE 5 for MAC

Status
Not open for further replies.

questhaven

Programmer
Mar 28, 2001
81
0
0
US
Hi there - I am so frustrated! For the life of me I cant figure out why this code works on my PC (both IE and Netscape) - but does not work on IE5 for the Mac. I am simply trying to submit a form. I am fairly new to javascript and below I have included the code. Any help would be appreciated!

<script language=&quot;JavaScript&quot;>
// adds an attachment based on form values
function attachmentEvent() {
if(document.NoteForm.attachmentStatus.value=='new') {
addAttachment(document.NoteForm.attachmentContent.value, document.NoteForm.attachmentType.value);
}
if(document.NoteForm.attachmentStatus.value=='edit') {
editAttachment(document.NoteForm.attachmentId.value, document.NoteForm.attachmentContent.value, document.NoteForm.attachmentType.value);
}
if(document.NoteForm.attachmentStatus.value=='delete') {
removeAttachment(parseInt(document.NoteForm.attachmentId.value) + 1);
}
document.NoteForm.attachmentContent.value = '';
document.NoteForm.attachmentType.value = '';
document.NoteForm.attachmentStatus.value = '';
document.NoteForm.attachmentId.value = '';
}


// adds the attachment content, type and changes the image
function addAttachment(content, aType) {
for(x=0;x<aList.length;x++) {
if(aList[x]=='') {
aList[x]=content;
tList[x]=aType;
changeImage(x+1, aType);
break;
}
}
}

function editAttachment(i, content, aType) {
aList=content;
tList=aType;
}

// fills form fields from array
function fillForm() {
if (browserName == &quot;Microsoft Internet Explorer&quot;)
for(x=0; x < aList.length; x++) {
document.getElementById('aContent' + (parseInt(x)+1)).value = aList[x];
document.getElementById('aType' + (parseInt(x)+1)).value = tList[x];
}

document.NoteForm.submit();

}

</SCRIPT>
<form NAME=&quot;NoteForm&quot; ID=&quot;NoteForm&quot; method=&quot;POST&quot; action=&quot;note_add.asp&quot;>

<textarea STYLE=&quot;width:100%&quot; rows=&quot;9&quot; ID=&quot;message&quot; name=&quot;message&quot; cols=&quot;21&quot; onKeyDown=&quot;textCounter(this.form.message,this.form.remLen);&quot; wrap=physical onKeyUp=&quot;textCounter(this.form.message,this.form.remLen);&quot;><%=templateContent%>
 
Only you know what &quot;does not work&quot; means. What is it supposed to do? What does it do? If it raises an error, what line is causing the error?
 
Sorry - the last few lines of this were cut off somehow:

<a name=&quot;btnSubmit&quot; id=&quot;btnSubmit&quot; class=&quot;btn2&quot; onFocus=&quot;attachmentEvent();&quot; title=&quot;Submit note&quot; href=&quot;javascript:fillForm();&quot; >Submit</a>

<a name=&quot;btnReset&quot; class=&quot;btn2&quot; title=&quot;Reset note&quot; href=&quot;javascript:document.NoteForm.reset();&quot;>Reset</a>
<a name=&quot;btnCancel&quot; class=&quot;btn2&quot; title=&quot;Cancel&quot; href=&quot;javascript:cancelNote();&quot;>Cancel</a>
</FORM>
--------------------------------------------------
It is supposed to submit the form when the Submit button is clicked. It currently does absolutely nothing when the submit button is clicked. It doesnt raise an error, nor is the submit processed or anything. It works fine on every browser I have tried except IE 5 for Macintosh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top