|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Javascript Problems
My JS;
Code:
<script language="javascript1.0">
<!--
function readmail(mbn,id)
{
alert('hi');
top.email_infobar.location = "email_infobar.php?mbn=" + mbn + "&id=" + id;
top.email_read.location = "email_read.php?mbn=" + mbn + "&id=" + id;
}
//-->
</script>
Now, when I use this: Code:
<a href="javascript:readmail('INBOX','1');"> click </a>
It comes back and says that it is undefined, but if I use: Code:
<a href="#" onClick="readmail('INBOX','1');"> click </a>
That works just fine. It seems if I call it from onClick, it always works. IE comes back, invalid object. NS comes back, readmail is not defined. Now, I run this in a frame. I have about 8 frames open, and in all the other frames, the JS in the HREF works just fine. I do not mind giving out the code, but it is a medium size project as it stands right, way to big to post most of it here. Any help would greatly be appreciated. Here is the file, partially complete. It is written in PHP and requires IMAP Extension installed to run it. It works for the most part, but atleast gives you an understanding of how I did everything. http://www.nuonce.net/webmail.tgz Also, I have tried to remove the JS/HTML style comments (<!-- //-->) like I had seen one post somewhere say, but that did not work. Thanks to whomever can help! |
|
#2
|
|||
|
|||
|
RE: Javascript Problems
Well, I guess I left out one thing ... I had a:
<base target="email_read"> I do have a frame name "email_read" ... not sure why it would fail on that. It was showing and all. I had removed that, I thought that I had tried that already, and it finally started to work. Anyways ... it seems if you define a global target, it was chooking for whatever reason. Oh well. |
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > Javascript Problems |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|