|
-
Jun 1st, 2002, 01:12 PM
#1
Thread Starter
Hyperactive Member
I'm new to JavaScript... Please Help guys!!
Hi.. This is my first post here.. It's just that i'm totally new to JavaScript!!
I just started 2 days ago.. I read a book of 250 pages, but i still have a tonne of questions!!
So, would anybody please please help me, and Show Me The Right Path??!!!!!!!
OK, here:
1. I need to write a code that exits (closes) a running window
(say an internet browser). Can i do that??
And if so, how?? (should i use the application name, or the browser title, or...??)???
2. How do i make a code (maybe through java or JavaScript), that emails back to a certain address, a certain string or text, supposing that the string to email is in a string variable????
3. Can i declare a static variable in JacaScript??? I mean i am trying to put a counter that incremnts everytime a new user access my page.. What is the smartest way to do that???
Please help!! Thanx to everyone!!
JAVASCRIPT ROCKS!!!!!
PLEASE
"And Now I'm Lika Major Threat, Cause I Remind U Of The Things U Were Made To Forget!" - (2PAC)
"Now They Label Me a Lunatic, Couldn't Care Less, Death or Success is What I Quest, Cause I'm Fearless!" - (2PAC)
" There's a light at the end of every tunnel, just pray it's not a train!! "
I am 100% addicted to Tupac. What about you?
I am 24% addicted to Counterstrike. What about you?
The #1 Tupac Fans Web Site | The Official Tupac Web Site
-
Jun 1st, 2002, 03:58 PM
#2
1. To do things like this use the window object:
The window object and the document object are the most important in JavaScript, whenever you want to do something with the current page, these are the place to look. (you can find a full JavaScript reference for example on MSDN)
2. As far as I know this is not possible with JavaScript. All you can do is open the client's email client. It may however be possible to use a 'form mailer' script, that you can find somewhere on the Internet (use google. These scripts can be used to send the contents of a filled in HTML form to an email address. You could use <input type="hidden"> elements, to make a hidden form with the information you want to send, and then use document.forms.name-of-form.submit(); javascript method to submit the form. Finaly you could direct the output to a hidden IFrame, so the user doesn't see the 'thank you for submitting this form' page usualy generated by such a script.
Actualy Javascript is not the thing to use here. These things should be done with server side (CGI) scripts. Unfortunatly most hosts don't provide a service for custom CGI scripts, in that case the Javascript solution is your best option.
3. You can do this with cookies. You can probably find something about them in your book.
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
|