Web Hosting Forum | Lunarpages

Author Topic: Beginer help  (Read 37470 times)

Offline almtlm

  • Trekkie
  • **
  • Posts: 16
Beginer help
« on: October 06, 2004, 11:27:49 AM »
I have a program that sends variable data by way of email using a java script ( created in lectora by trivantis).
It functions correctly from my home computer and from tech suport at Lunar pages but not from my computer at work nor my wifes computer at her work.
I suspect that there is something going on with a fire wall.
Is there a way for the email to be processed just on the Lunar pages server with out involving the user's computers mail system?

Lupine1647

  • Guest
Beginer help
« Reply #1 on: October 06, 2004, 12:04:34 PM »
PHP may be your answer here.

Offline GMTurner

  • Berserker Poster
  • *****
  • Posts: 7499
    • Turner's Lounge
Beginer help
« Reply #2 on: October 06, 2004, 12:12:01 PM »
Just to make sure I'm understanding the question...

You have a java script which when you access is supposed to send information via email. It works when you access it from home and it works when tech support accesses it, but it does not work when you access it from work. Correct?

What do you mean by it does not work? Are you not able to access the script at all or does it just not send the email?
The above information may or may not reflect current policy, opinions, or views since it was likely made almost 10 years ago.

Offline TranzNDance

  • Princess of Naboo
  • Berserker Poster
  • *****
  • Posts: 11607
    • Thu Tu's Blog
Beginer help
« Reply #3 on: October 06, 2004, 12:14:47 PM »
Could you post the link to the script?
:whip: :love: :whip: :love: :whip: :love:

Offline almtlm

  • Trekkie
  • **
  • Posts: 16
Beginer help
« Reply #4 on: October 06, 2004, 04:17:58 PM »
here is the section of script from the page that gets the variables for the form and the submitial of the form by email.
The submitial is sucessfull at home and by lunar pages support but not at two other computers.
Since I would like for people to take the  training from computers that may be at a work site I would like to know why it might not be getting sent.
I suspect firewall issues.
THanks for your help

function trivUpdateEntry() {
  entry312.objLyr.doc.forms["entry312form"]["Name"].blur();
  entry314.objLyr.doc.forms["entry314form"]["email"].blur();
  entry316.objLyr.doc.forms["entry316form"]["Phone"].blur();
  entry318.objLyr.doc.forms["entry318form"]["Comment"].blur();
}

function Update_entry318( upd ) {
  if (upd.value.length > 250) {
    alert( 'You have exceeded the maximum allowable size for this field (250 characters)' )
    upd.value = upd.value.substring(0,250)
    upd.focus()
    upd.select()
    return false;
  }
  VarEntry_0004.set(upd.value)
  return true;
}

function Process_form310() {
  var titleMgr = getTitleMgrHandle()
  if( titleMgr ) {
    if(VarDisply_pic.f > 0) VarDisply_pic.uDT(); else VarDisply_pic.getValue();
    if(VarEntry_0001.f > 0) VarEntry_0001.uDT(); else VarEntry_0001.getValue();
    if(VarEntry_0002.f > 0) VarEntry_0002.uDT(); else VarEntry_0002.getValue();
    if(VarEntry_0003.f > 0) VarEntry_0003.uDT(); else VarEntry_0003.getValue();
    if(VarEntry_0004.f > 0) VarEntry_0004.uDT(); else VarEntry_0004.getValue();
    entry312.objLyr.doc.forms["entry312form"]["Name"].blur()
    titleMgr.addFormElement( 'Name', VarEntry_0001.getValue() )
    entry314.objLyr.doc.forms["entry314form"]["email"].blur()
    titleMgr.addFormElement( 'email', VarEntry_0002.getValue() )
    entry316.objLyr.doc.forms["entry316form"]["Phone"].blur()
    titleMgr.addFormElement( 'Phone', VarEntry_0003.getValue() )
    entry318.objLyr.doc.forms["entry318form"]["Comment"].blur()
    titleMgr.addFormElement( 'Comment', VarEntry_0004.getValue() )
    var errMsg = titleMgr.emailForm( 'a.murphy@e-trainingsolutions.com', false, false )
    if( errMsg ) alert( errMsg )
    else alert( 'Your information has been successfully submitted.' )
  }
}

Offline GMTurner

  • Berserker Poster
  • *****
  • Posts: 7499
    • Turner's Lounge
Beginer help
« Reply #5 on: October 06, 2004, 05:16:34 PM »
What is the error that you get when you submit the form? What about it does not work? You said that the submission doesn't work, but can you be more specific about the error?

Also, on the page that handles the submission, are you checking the referrer to the page? Basically trying to make sure that the data is being submitted from the form... if so, some firewalls and security software block the referrer info from being sent which could be the cause of the problem... again, depending on what exactly the problem with submitting it is.
The above information may or may not reflect current policy, opinions, or views since it was likely made almost 10 years ago.

Offline almtlm

  • Trekkie
  • **
  • Posts: 16
Beginer help
« Reply #6 on: October 06, 2004, 06:52:31 PM »
The erro message that shows in a pop up message screen is
mail i/o error
If it is a fire wall issue with certin computer networks  can I have the program use a php script to use a mail program on the same server as the web page.
If so any recomendations?
Thanks

Offline Aiham

  • Spaceship Navigator
  • *****
  • Posts: 98
Beginer help
« Reply #7 on: October 06, 2004, 07:28:01 PM »
Google can be your friend:

http://email.about.com/cs/phpemailtips/qt/et031202.htm

Or

http://www.totallyphp.co.uk/code/send_email_using_the_php_mail_function.htm

These are just basic ones that I found on the first page of a Google search, but ofcourse there are more complex scripts that can give extra details such as why an error occured, or something similar.

Offline GMTurner

  • Berserker Poster
  • *****
  • Posts: 7499
    • Turner's Lounge
Beginer help
« Reply #8 on: October 06, 2004, 07:31:41 PM »
I'm still not completely clear on how things are supposed to work here... been a long day...

Can we get a link to the form? I might be able to figure out more if I could actually see what is going on with everything...
The above information may or may not reflect current policy, opinions, or views since it was likely made almost 10 years ago.

Offline almtlm

  • Trekkie
  • **
  • Posts: 16
Beginer help
« Reply #9 on: October 06, 2004, 07:53:54 PM »
Sure
e-trainingsolutions.com
the submit problem is on the request info page.

Offline GMTurner

  • Berserker Poster
  • *****
  • Posts: 7499
    • Turner's Lounge
Beginer help
« Reply #10 on: October 06, 2004, 08:16:11 PM »
Okay... this looks like it will end up being more of a javascript problem than email... the code used seems to be excessive for what you are really needing it to do... not your fault but the program you used to create this page didn't create the "prettiest" code...

Anyway, the script is basically being run on the client via the browser (javascript) to send the email... and hence the computer it is being used on has to allow for outgoing mail being sent from a webpage... now that I've seen the full page I understand the code you included earlier a little better... at least what it is trying to do...

My recommended solution would be to scratch this whole approach and create a simple HTML form that upon being submitted would send the contents to a script to mail the information... I'd go with a PHP script, but there are other options out there... the links MrHammami gave could help... but a lot will depend on how much you know about PHP and creating the HTML forms...

Also, you might be able to get more assistance from people in the javascript forum who might be able to suggest a workaround using javascript... I don't know that much about javascript...
The above information may or may not reflect current policy, opinions, or views since it was likely made almost 10 years ago.

Offline TranzNDance

  • Princess of Naboo
  • Berserker Poster
  • *****
  • Posts: 11607
    • Thu Tu's Blog
Beginer help
« Reply #11 on: October 06, 2004, 08:47:42 PM »
I'll move this over to the javascript section.

edit: move done.
:whip: :love: :whip: :love: :whip: :love:

Offline almtlm

  • Trekkie
  • **
  • Posts: 16
Beginer help
« Reply #12 on: October 07, 2004, 04:01:35 AM »
Thanks
That is what I thought
Code is not my strong point. I can follow the logic but my typing erros are the death of me. Even good code does not work when I misspell and dont use caps on a server file but in the code ;}.
Will look at some simple PHP script.

Offline faisal

  • Trekkie
  • **
  • Posts: 13
Beginer help
« Reply #13 on: October 07, 2004, 05:14:17 AM »
I think it is much more easier to do it using JSPs. If your server have the support of JSPs then following link will help you.
See http://www.lunarforums.com/forum/viewtopic.php?t=13587

You can do it in no time using above code.

Using jsps/servlet mean no issue of firewall as the jsp code will execute on the server and not on the client side. So it will work from everywhere...

Offline almtlm

  • Trekkie
  • **
  • Posts: 16
Beginer help
« Reply #14 on: October 07, 2004, 06:12:07 AM »
Thanks guys that will cover exactly what I am looking for and since I have proof it works on LP then I can hunt my typos and such till it works!

 

Share |