|
about the mouseover, I got it. thanks Fred
hifiger2004
|
|
|
|
|
solved this problem...
--------------------------------------------------------------------------------------
hi, i have a problem.
no much more knowledge with asp, i m fresh, try to learning.
my problem is ;
have an mail adresses more than thousand,(155,000), and i create any e-bulten and sending to this adresses.
but manually,
how to automatically send this e-bulten to this adresses.
i mean, i have web mail server account and web page.how to create a page to send automatically any mail to this adresses.one and one.
thank you much more
-- modified at 3:29 Monday 14th May, 2007
|
|
|
|
|
The site in question is a "classic" ASP site using VBScript (not .net). Do not suggest that I use .Net because it's not in the requirements for what I'm doing (although in this case I admit it would be a better choice)...
One of the pages appends stuff to the query string so that the post-back will reload the page and cause the page to behave/appear differently. It looks something like this when the post back occurs:
mypage.asp?myAction=blahblah&thisOption=1
In the process of testing the page, I came to realize that if the user refreshes the page, the previous contents of the querystring are once again passed to the browser (in a way, I can understand why). The only way I've discovered to clear the querystring (to avoid the refresh problem) is to do a redirect back to the same asp page with no querystring, like so:
Response.Redirect("mypage.asp")
Is there a way to actually erase the querystring without using Redirect? The way I'm doing it seems like a noob hack.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
If you have control of the referring page use the post method instead of the get method to pass variables so they don't appear in the url in the first place.
The redirect only cloaks the problem because the full url is still in the browsers history and can be retrieved by hitting the back button.
The point is that once you have navigated to the page with get variables tacked on to the url the full url is in the browser history and can be accessed. If you want it not to appear use the post method to pass parameters to the receiving page.
|
|
|
|
|
Is it possible to specify the mthod in a link tag (as opposed to using a button on a form)?
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
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
|
|
|
|
|
You can easily submit a form using a plain hyperlink, but of course it does rely on javascript. Create your form element with method="post" and all necessary hidden (or otherwise) fields and give it a unique ID. You can then use document.getElementById("formid").submit() on the onclick event of the hyperlink (or better yet, the onfocus event). Alternatives to this are document.forms[0].submit() and the like but I'm not sure of cross browser issues with that. If you keep the href attribute with your current method (query string params) this will also work without javascript.
Hmm, just read the above post in full (I know, I should done that first...) and the first method is similar. BTW, the <a> tag is an 'anchor' tag not 'address', and the <link> tag is for linking external documents such as style sheets, normally when people say a link they mean an anchor tag.
|
|
|
|
|
These links are not part of a form.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
JimmyRopes wrote: 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.
The *only* reason I'm using vbscript is because I was told not to convert it to .Net (and C#). In other words, I have no choice because the boss said to use vbscript.
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
|
Hi,
I would like to know "how to write code in .net using the .net connector that will recive Idoc's from a SAP System?".
Can Biztalk do this without writing .net code ? I have used the "SAP Adapter for Biztalk" and have been able to download the IDoc schemas. Now that i have the schemas, i would also need the Idocs. Thus i will reframe my question again "How can i receive the Idocs from the SAP System to BizTalk?. "
Any pointers on this would be extremely useful.Please help me.
|
|
|
|
|
Am new but know a little more in web design.am a vb/sql programmer.am requested to Build a website, and i have to keep track of number of users accessing the site,time,location,browser type,ip, city,Country.i have to give these reports Every month and e-mail it to users monthly and be able to retrieve the reports daily and weekly
help how do i start. i have web design knowledge.
Vuyiswa
|
|
|
|
|
|
So you mean i should use, Templates?
Vuyiswa
|
|
|
|
|
No templates - just a small bit of javascript on each page, and you can then view reports online (some graphical) and have summaries emailed to you.
Read the info on the website!
F
|
|
|
|
|
Thank Man you are a Star
Vuyiswa
|
|
|
|
|
Two quick questions:
1. I really love Mozilla Firefox's javascript.options.strict mode (type about:config in addressbar). However it still doesn't pick up on certain things such as making it compulsory to have semi-colon as a statement terminator. I have hundreds of organically grown JavaScript files that are millions lines long. They are not written by me but by former employees and I've been handed the job of debugging & fixing their code. Does anyone know of a good Very strict JavaScript syntax verifier checker? What is the best JavaScript IDE out there?
2. What happens if I keep on writing:
var control = new Control();
var control = new Control();
var control = new Control();
500 times? Will this cause a memory leak? Or will the previous object be deleted since the reference is lost? Or is it handled differently in IE & FF?
|
|
|
|
|
there wont be any memory leak it is handled by DOM it will consider the last
var control = new Control();
|
|
|
|
|
Hello,
I'm new to the web development world and I'm hoping someone can point me in the right direction.
I have an asp.net website (I'm using a starterkit from www.asp.net). I want to apply a different stylesheet if the client is a mobile device. I'm using a plugin that gives me the client device's display settings. If the display is below a certain resolution I want to use mobile.css. Otherwise, I want to use default.css.
My understanding is that the style gets applied on the server when a request is made, and the resulting html is returned to the client. But I want the decission as to what style gets applied to be made by the client. How can I go about using javascript to change the stylesheet on the fly? Or, if I'm barking up the wrong tree, is there a way for me to program this functionality in the codebehind (I don't think there is, as the decission would have to be made on the client...)?
Thanks for your help! (I'm a total noob in this area!)
Ian
|
|
|
|
|
u can do it in ur client script by adding dynamic CSS and removing old one. And also donot cache the css in client side. use CacheControl=no-cache for that CSS probaly in IIS as a header.
|
|
|
|
|
Does the CSS need to be embedded in the HTML? Or can it just be linked to CSS on the server?
Ian
|
|
|
|
|
You can use the 'link[^]' tag to identify the CSS file, with the media attribute specifying what device the file should be used for.
|
|
|
|
|
Thanks! I'll give this a try.
Ian
|
|
|
|
|
ibowler wrote: I want to apply a different stylesheet if the client is a mobile device.
Put something like this in the <head> section of the page.
<style type="text/css" media="all">
@import "./styles/layout.css";
@import "./styles/presentation.css";
</style>
<style type="text/css" media="screen">
@import "./styles/screen.css";
</style>
<style type="text/css" media="print">
@import "./styles/print.css";
</style>
<style type="text/css" media="handheld">
@import "./styles/handheld.css";
</style>
CSS 2 Media Types[^]
The media=all would be a general layout (header, body, footer, navigation, etc.) and presentation (color, background, etc.) for any media and the specialized by device style sheets override the things specific to the particular device.
|
|
|
|