-
Send button code error
I have a contact us page and I put this code for it. I also have a submit button which when clicked should submit the text fields.
I get an error saying:
1084: Syntax error: expecting rightparen before eq.
I do not understand how to fix this problem
Here is my code:
Code:
submit.addEventListener(MouseEvent.CLICK, submit);
function submit(event:MouseEvent) {
if (message eq "" or email eq "") {
stop ();
} else {
loadVariablesNum ("form.php", 0, "POST");
gotoAndPlay("thanks");
}
}
Thanks in advance,
SK
-
Senior Member
Code:
function submit(event:MouseEvent)
{
if (message == "" || email == "")
{
stop();
}
else
{
loadVariablesNum("form.php", 0, "POST");
gotoAndPlay("thanks");
}
}
-
Sorry, I still seem to have the same problem. Please take a look at my file and let me know
https://rapidshare.com/files/3868056...b_website4.rar
Thanks,
S K
-
Senior Member
well, like i said use:
Code:
if (message == "" || email == "")
then the 1084: Syntax error: expecting rightparen before eq. goes away.
however a lot of other errors are also in the file.
-
yes I did notice that, so how can I get rid of those errors?
Imagination is the creator of reality...
-
New code, but seems to have AS2
Okay I googled and researched a lot. This is my code now (i changed message to mes as well as the instance. I made various other changes also):
Code:
submit.onRelease = function() {
if(mes.text == ""||email.text == "")
{
stop();
}
else
{
loadVariablesNum("form.php", 0, "POST");
gotoAndPlay("thanks");
}
}
Now I only have one problem.
Error: 1180: Call to a possibly undefined method loadVariablesNum.
After researching, it turns out this is for AS2. I need to change this to be AS3. Lots of people seem to have said to use a URLLoader, but I don't really know how to use it.
Can I get some help with this?
Thanks in advance,
S K
-
Senior Member
-
I looked at the livedocks, but couldn't really implement it in my code.
Is it possible you can edit my code to best help me?
Thanks,
S K
-
I'm a new member, so I'm just looking around.
-
anyone have a modified code?, it would really help me
Tags for this Thread
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
|