HTML, JavaScript And CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingHTML, JavaScript And CSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old September 24th, 2003, 04:03 PM
Aberdeen Aberdeen is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 1 Aberdeen User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
How to pass URL using javascript into email

I am using asp and javascript. I want to be able to pass the whole of a url into outlook express using javascript. The problem is is only takes the url to the first & and then ignores the other parameters.

eg. the url is URL

but in the email message on the following appears :

URL

I think I know why this is happening as javascript uses the & operator itself, but I have no idea for a solution

Pleas Help

Reply With Quote
  #2  
Old October 22nd, 2003, 02:20 PM
lillu lillu is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 28 lillu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Basically, this works for me but obviously I do not know the code you're using...

<input type="button" value="Submit" onclick="passURL();">
<script>
function passURL(){
window.location ="http://www.spam.com/test.asp?qA=1&qB=2&qC=3";
}
</script>

BTW, javascript uses the operator itselft but not for concatenation, which is the + sign but for the conditional AND. So I assume the error in your script comes from somewhere else.

Reply With Quote
  #3  
Old November 22nd, 2003, 04:48 AM
ALIMH ALIMH is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: ca
Posts: 1 ALIMH User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I have the same problem ( my submit botton dosent work) when you press submit it will give script error, and never goes to my email, any one please help (I am using Microsoft Publisher

Reply With Quote
  #4  
Old November 22nd, 2003, 05:39 AM
lillu lillu is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Posts: 28 lillu User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
There are many ways of sending name-value pairs from a form to a script that will handle it.
It can be done via the POST or the GET method (query string)

If ou're using both the POST method like this
<form action="/cgi/gdform.cgi" method="post"> AND query strings (which is basically the GET method) the script will obviously crash.

As you could see in my example, I used query strings and not post.

Last edited by lillu : November 23rd, 2003 at 02:39 AM.

Reply With Quote
  #5  
Old August 10th, 2004, 12:47 AM
ckarthikeyan ckarthikeyan is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 ckarthikeyan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb

I want to pass the ASP variable value[Dim x] or a HTML Variable value (ie) <select id=test name=test><option value="kumar">kumar</option> as a values to the URL.
I tried case1 and case2 it is not working but case3 is working.

<%
Dim x
x="Kumar"

%>
<script>

switch(document.frmReportSetup.radMerReportType(i) .value)
{ case '1':{ document.frmReportSetup.action = "..\\online\\HOLR1Setup.asp?Name=<%=x%>"; break; }
case '2':{ document.frmReportSetup.action = "..\\online\\ResponseCodeSummary.asp?Name=<%=test%>"; break;}
case '3':{ document.frmReportSetup.action = "..\\online\\HOLR1Setup.asp?Name=kumar; break; }
}
<script>
Any Explanation regarding this.

Reply With Quote
  #6  
Old August 10th, 2004, 12:49 AM
ckarthikeyan ckarthikeyan is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 2 ckarthikeyan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb

I want to pass the ASP variable value[Dim x] or a HTML Variable value (ie) <select id=test name=test><option value="kumar">kumar</option> as a values to the URL.
I tried case1 and case2 it is not working but case3 is working.

<%
Dim x
x="Kumar"

%>
<script>

switch(document.frmReportSetup.radMerReportType(i) .value)
{ case '1':{ document.frmSetup.action = "..\\online\\testSetup.asp?Name=<%=x%>"; break; }
case '2':{ document.frmSetup.action = "..\\online\\testCSummary.asp?Name=<%=test%>"; break;}
case '3':{ document.frmSetup.action = "..\\online\\testsetup.asp?Name=kumar; break; }
}
<script>
Any Explanation regarding this.

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingHTML, JavaScript And CSS Help > How to pass URL using javascript into email


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT