Click here to Skip to main content
15,896,153 members
Home / Discussions / Web Development
   

Web Development

 
GeneralRe: BUTTON OVER IMAGE IN ASP.NET? Pin
Fred_Smith11-May-07 9:53
Fred_Smith11-May-07 9:53 
GeneralRe: BUTTON OVER IMAGE IN ASP.NET? Pin
hifiger200411-May-07 17:33
hifiger200411-May-07 17:33 
GeneralRe: BUTTON OVER IMAGE IN ASP.NET? Pin
hifiger200411-May-07 17:48
hifiger200411-May-07 17:48 
Questionasp mailler [modified]----solved Pin
emrefc11-May-07 5:41
emrefc11-May-07 5:41 
QuestionClearing the QueryString Pin
#realJSOP11-May-07 5:33
professional#realJSOP11-May-07 5:33 
AnswerRe: Clearing the QueryString Pin
JimmyRopes12-May-07 5:50
professionalJimmyRopes12-May-07 5:50 
GeneralRe: Clearing the QueryString Pin
#realJSOP12-May-07 7:52
professional#realJSOP12-May-07 7:52 
GeneralRe: Clearing the QueryString [modified] Pin
JimmyRopes12-May-07 9:49
professionalJimmyRopes12-May-07 9:49 
The only two ways that I know of to specify a post method (or get method for that matter) is in a form and XHTTPRequest object. There may be others but these are the two I use.

I don't know how you would do it in vbscript but in javascript I do it by sending the href and/or onclick events to a script. You can probably figure out how to do something like this in vbscript.

There is no reason why you cannot use javascript, unless you wanted to hone your vbscripting skills for your ciriculim vitae. I never really thought about you as a VB anything type of guy but from your recient posts I take it you are learning it.

I have never used the <link> tag but have used the address anchor tag like this in a menu bar.

<a class="nav" title="Process" href="javascript:jump('/process.htm');">Process</a>

I am pretty sure it will work on a <link> tag but just have never used it myself so you would have to try. In any case the <a> tag works just fine for navigation.

In the script you can submit a hidden form or process an XMLHTTPRequest to post parameters to the target page or server side script.

function jump(TARGET){
document.getElementById('parm1').value = 'Parm1';
document.getElementById('parm2').value = 'Parm2';
document.getElementsByTagName('form')[0].action = TARGET;
document.getElementsByTagName('form')[0].submit();
} // function jump(TARGET)

Where parm1 and parm2 are hidden input fields that you want to give values to in the script or you can alternatively set up an XMLHTTPRequest passing parameters to a server side script that will return the new body of the page. I use PHP on an Apache server so you would have to figure out how to do it in ASP or some other suitable server side scripting language in IISland.

That way you can setup an index.html (default.html) page and only ever have a path name in the address bar of the browser. If the user refreshed the page they would get the index.html (default.html) page again.

A bit more complicated but can be done something like this.

var Request = new getXMLHttpRequest();
Request.onreadystatechange = myReadyStateChangeHandler;
var parms= '';

function jump(TARGET){
Request.open("post", "http://" + location.host + TARGET + ", true);
Request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;");
parms= "parm1=" + encodeURIComponent('Parm1')
+ "&parm2=" + encodeURIComponent('Parm2');
Request.send(parms);
} // function jump()

function myReadyStateChangeHandler(){
if (HTTPREQUEST_COMPLETED == Request.readyState){
if (HTTPREQUEST_SUCCESS == Request.status){
document.getElementsByTagName('body')[0].innerHTML = reply;
} // if (HTTPREQUEST_SUCCESS == Request.status)
else{
alert("Error: HTTP "
+ Request.status
+ " "
+ Request.statusText
+ " Please contact our WebMaster from the link on our Contact Us page explaining the error you received. Thank you.");
} // else [if (HTTPREQUEST_SUCCESS == Request.status)]
} // if (HTTPREQUEST_COMPLETED == Request.readyState)
} // function myReadyStateChangeHandler()

getXMLHttpRequest() is a homegrown script (javascript of course) that sets up the XMLHttpRequest object and defines the constant values HTTPREQUEST_COMPLETED and HTTPREQUEST_SUCCESS.

It determines if the browser has a native XMLHttpRequest object or if it is IE prior to IE7, in which case it returns an CaptiveX (Scott McNealy's name for ActiveX) object.

Google XMLHttpRequest and there are a gazillion examples, some probably even in vbscript. If you can't find something suitable email me and I will send you a copy of a script (javascrippt of course) that returns data asynchronously but you can change the third parameter in the XMLHttpRequest open method to false to make it operate synchronously.


-- modified at 12:14 Monday 14th May, 2007

Simply Elegant Designs JimmyRopes Designs
Think inside the box! ProActive Secure Systems

I'm on-line therefore I am.
JimmyRopes


AnswerRe: Clearing the QueryString Pin
badgrs14-May-07 3:34
badgrs14-May-07 3:34 
GeneralRe: Clearing the QueryString Pin
#realJSOP14-May-07 4:18
professional#realJSOP14-May-07 4:18 
GeneralRe: Clearing the QueryString Pin
JimmyRopes14-May-07 6:11
professionalJimmyRopes14-May-07 6:11 
GeneralRe: Clearing the QueryString Pin
#realJSOP14-May-07 4:20
professional#realJSOP14-May-07 4:20 
GeneralRe: Clearing the QueryString Pin
JimmyRopes14-May-07 6:27
professionalJimmyRopes14-May-07 6:27 
QuestionBizTalk Clarification Pin
Prashant C11-May-07 1:29
Prashant C11-May-07 1:29 
QuestionHow Do make a website reports Pin
Vimalsoft(Pty) Ltd11-May-07 1:21
professionalVimalsoft(Pty) Ltd11-May-07 1:21 
AnswerRe: How Do make a website reports Pin
Fred_Smith11-May-07 1:54
Fred_Smith11-May-07 1:54 
GeneralRe: How Do make a website reports Pin
Vimalsoft(Pty) Ltd11-May-07 2:11
professionalVimalsoft(Pty) Ltd11-May-07 2:11 
GeneralRe: How Do make a website reports Pin
Fred_Smith11-May-07 2:34
Fred_Smith11-May-07 2:34 
GeneralRe: How Do make a website reports Pin
Vimalsoft(Pty) Ltd11-May-07 2:39
professionalVimalsoft(Pty) Ltd11-May-07 2:39 
QuestionHELP: Strict JavaScript Syntax Checker Verifier Pin
dhruba.bandopadhyay10-May-07 23:43
dhruba.bandopadhyay10-May-07 23:43 
AnswerRe: HELP: Strict JavaScript Syntax Checker Verifier Pin
subrata.jana11-May-07 0:25
subrata.jana11-May-07 0:25 
QuestionChange style based on device type Pin
Mundo Cani10-May-07 21:48
Mundo Cani10-May-07 21:48 
AnswerRe: Change style based on device type Pin
subrata.jana11-May-07 0:28
subrata.jana11-May-07 0:28 
GeneralRe: Change style based on device type Pin
Mundo Cani11-May-07 6:31
Mundo Cani11-May-07 6:31 
AnswerRe: Change style based on device type Pin
Johnny ²11-May-07 9:49
Johnny ²11-May-07 9:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.