/    Sign up×
Community /Pin to ProfileBookmark

Help a New developer to grow!

Hi all. I am new to this forum and Javascript also. Let me explain my problem now.

If a visitor clicks my web page submit button(ex., [url]www.example.com/yyy.html)[/url], i need to get a email without the visitor kjnowing that im getting an email. and also he will need to go to another page like example.com/xxx.html. i don’t know whether it is possible in Javascript. and i don’t know how to proceed

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@FangSep 01.2005 — Not with JavaScript. Ask in one of the server-side language forums.
Copy linkTweet thisAlerts:
@aditya_internetSep 01.2005 — Hi,

As you said you dont know much about Javascript, let me tell you that yes this can be done using iframes.

I dont know if you have already made the script to send you email or not.

You can use service provided by http://www.cutandpastescripts.com/

You will have to make following changes :

[code=html]<form name="send_me_mail" action="some_script.html" target="hidden_iframe">[/code]

Main thing is the target part which will redirect your action to a frame and we are going to use an iframe that is kept hidden in page.

[code=html]<iframe name="hidden_iframe" src="" onLoad="top.location.href='thanx.html'"
style="visibility:hidden" width="1" height="1"></iframe>[/code]


In the iframe tag [B]onLoad[/B] will redirect the main page to thanx.html, that is when the form is submitted the send mail script will be loaded in iframe and onLoad it will redirect. style is set to make the visibilty hidden.

If you have made the send mail script your self then it will be very easy to redirect the page to thanx page after sending the email by making some changes to the script, then all this will not be required.
Copy linkTweet thisAlerts:
@aditya_internetSep 01.2005 — Not with JavaScript. Ask in one of the server-side language forums.[/QUOTE]

Dear Fang,

Please make it a note for future that, [B]everything is possible in Javascript[/B].

But it is just this, there are better way to do it.
Copy linkTweet thisAlerts:
@BigMoosieSep 01.2005 — [B]everything is possible in Javascript[/B].[/QUOTE]

JavaScript won't make me coffee.

Everything you posted is completely redundant. All you need to do is post the form to the second page which will have a server side script on it that sends the email. No iframes and JavaScript simply cannot enhance these requirements.
×

Success!

Help @umap spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...