Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Community Forums
 Community Discussions (All other subjects)
 Javascript

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
MaD2ko0l Posted - 12 February 2009 : 16:08:03
hiya,

i have a small problem, not perticuarlly forum related but maybe somone knows how to help me out.

basically i need to combine 2 bits of javascript but i dont know enough javascript to do it.

<script  language="JavaScript">
<!-- Hide from older browsers...
//Function to check form is filled in correctly before submitting
function CheckForm () {

var errorMsg = "";

//Check for a Name
if (document.MyForm.Name.value==""){
errorMsg += "\n\tName \t\t- Please Enter Your Name!";
}

//Check for Comments
if (document.MyForm.Comments.value==""){
errorMsg += "\n\tCommentss \t- Please Enter Description Of The File Being Uploaded!";
}

//Check for File to be uplaoded
if (document.MyForm.FILE1.value==""){
errorMsg += "\n\tFile \t- Please Select A File To Be Uploaded!";
}

//If there is a problem with the form then display an error
if (errorMsg != ""){
msg = "____________________________________________________________________\n\n";
msg += "Your File has not been submitted because there are problem(s) with the form.\n";
msg += "Please correct the problem(s) and re-submit the form.\n";
msg += "____________________________________________________________________\n\n";
msg += "The following field(s) need to be corrected: -\n";

errorMsg += alert(msg + errorMsg + "\n\n");
return false;



}

return true;
}
// -->
</script>


this bit of javascript is called with the onSubmit function, and if there isnt any errors with the form, it then needs to run this bit of code.

<SCRIPT LANGUAGE="JavaScript">
function ShowProgress()
{
strAppVersion = navigator.appVersion;
if (document.MyForm.FILE1.value != "" || document.MyForm.FILE2.value != "" || document.MyForm.FILE3.value != "")
{
if (strAppVersion.indexOf('MSIE') != -1 && strAppVersion.substr(strAppVersion.indexOf('MSIE')+5,1) > 4)
{
winstyle = "dialogWidth=385px; dialogHeight:140px; center:yes";
window.showModelessDialog('<% = barref %>&b=IE',null,winstyle);
}
else
{
window.open('<% = barref %>&b=NN','','width=375,height=115', true);
}
}
return true;
}
</SCRIPT>



can somone point me in the right direction on how i go about doing the 2?

thansk very much

MaD2ko0l<
1   L A T E S T    R E P L I E S    (Newest First)
MaD2ko0l Posted - 12 February 2009 : 20:17:49
no worries.. think i got it sorted now.

thanks anyway<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000 Version 3.4.07