|
-
Feb 3rd, 2010, 10:20 AM
#1
Thread Starter
Frenzied Member
load an html file in javascript
Hey,
I have this piece of code with does not function correctly. I have little experience with Javascript. Can someone help pls?
<head>
<title>Membership</title>
<script language="javascript" type="text/javascript">
Code:
function Validate() {
Message = "";
Message = Message + CheckName();
Message = Message + CheckPassword();
Message = Message + CheckConfirm();
Message = Message + Compare();
if (Message == "") {
alert ("well done");
window.open( "file:///C:/Users/Main/Desktop/menu/Thankyou.htm","__self");
return true
}
else {
alert(Message);
return false;
}
}
however if I change this line to this it will be okay:
window.open( "file:///E:/Myfolder/Int-IT/Int-IT/Wed%20Design/menus/Thankyou.htm","__self");
------------------------------------------------------------------------
If an answer to your question has been helpful, then please, Rate it! 
-
Feb 3rd, 2010, 12:58 PM
#2
Re: load an html file in javascript
Where is your file (the one you're showing code from) located? On C:/? On E:/? Elsewhere?
-
Feb 3rd, 2010, 01:13 PM
#3
Re: load an html file in javascript
My guess would be that file:///C:/Users/Main/Desktop/menu/Thankyou.htm as defined, doesn't exist.
-tg
-
Feb 3rd, 2010, 02:02 PM
#4
Thread Starter
Frenzied Member
Re: load an html file in javascript
That code fixed. Thankyou
------------------------------------------------------------------------
If an answer to your question has been helpful, then please, Rate it! 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|