|
Guffa wrote: The javascript: protocol is only
But including it is just superflous. It does not harm or create negative effects either.
|
|
|
|
|
Vasudevan Deepak Kumar wrote: But including it is just superflous. It does not harm or create negative effects either.
It's not superflous, as it's not ignored. It's harmless just because it happens to become a label instead.
---
single minded; short sighted; long gone;
|
|
|
|
|
Thank you Guffa for enlightening on the issue. Since, I think, the web browser defaults to JavaScript engine, it automatically understands the same. For Netscape and other single-script engines, I don't this should be a problem at all. Isn't it?
|
|
|
|
|
Vasudevan Deepak Kumar wrote: Since, I think, the web browser defaults to JavaScript engine, it automatically understands the same. For Netscape and other single-script engines, I don't this should be a problem at all. Isn't it?
The javascript: protocol only has a meaning in an url. If you put it anywhere else, it's not a protocol any more. Instead, it happens to become a label instead, so it's just a name.
You could put most anything in a label:
onclick="vbscript:alert('Still Javascript');"<br />
<br />
onclick="ignore:alert('Not ignored');"<br />
<br />
onclick="onmouseover:alert('Still onclick');"
It's still just a label, and the name doesn't mean anything.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi,
I am having problem on the upload page.
Everytime I will uploaded a file, then clicked on my upload button it will process twice, why is it?
How can I control the process to have only 1 process everytime I clicked on the upload button?
Thanks
hifiger2004
|
|
|
|
|
You might be in debug mode or check same thing on different browsers.
Thank You
|
|
|
|
|
Did you check for IsPostBack check?
|
|
|
|
|
I have a simple HTML file and would like to be able to insert a link to a folder. However, the path contains the users Windows logon account name, for example:
C:\Program files\some folder\[account name]\some folder
is it possible to dynamically determine the account name, so that the link is relative for each user?
Regards.
James
|
|
|
|
|
If your web application is written in ASP.NET and is integrated with windows-authentication and anonymous access disabled, you get the current user name by using User.Identity.
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
Thanks for the update.
I am afraid that it is just a very simple HTML file that I need to update with the specified link. It is not written in ASP.NET.
Thanks anyway.
James.
|
|
|
|
|
Then as a simple HTML file there is nothing you can do to dynamically change any information. You will need some kind of processing to be performed when the file is served, which implies something like ASP.
|
|
|
|
|
It is not possible to do in HTML... but maybe.. Try to use ActiveX object in Javascript.... but it might work only Internet explorer. and it is not good practice.. so, i never done this before..
Thanks and Regards,
Michael Sync ( Blog: http://michaelsync.net)
If you want to thank me for my help, please vote my message by clicking one of numbers beside "Rate this message". Why vote? Plz Read it here. Thank you.
|
|
|
|
|
|
Thank you very much to all who responded.
|
|
|
|
|
Hello. I'm not sure about how to do that. It seems simple. I have two elements that have two excluding values, A and B. What I need is that if I select A option in one, B is set in the other, and if I set B, the other is set with A.
How can I do that?
Regards,
Diego F.
|
|
|
|
|
|
Thank you, but I'm not sure if that is what I need. I find examples from one select loading another select. But I have two select that have the same two options, and any of them can be selected, so the other takes the other value.
Regards,
Diego F.
|
|
|
|
|
Diego F. wrote: the other takes the other value.
Meaning it should NOT be the same as the one in the first dropdown? You may need to actually iterate through the options array to achieve the same and unselect in case of violation?
|
|
|
|
|
What I need is that:
select1: options A and B
select2: options A and B
Select1 is set to A --> Select2 is set to B
Select1 is set to B --> Select2 is set to A
Select2 is set to A --> Select1 is set to B
Select2 is set to B --> Select1 is set to A
Maybe the above explanation wasn't clear enough.
Regards,
Diego F.
|
|
|
|
|
Is this what you're after?
<html>
<head>
<script language="javascript">
<!--
function s(a,b){
var sel1 = document.getElementById(a);
var sel2 = document.getElementById(b);
if (sel1.selectedIndex==0) {
sel2.selectedIndex=1;
} else {
sel2.selectedIndex=0;
}
}
//-->
</script>
</head>
<body>
<select id="s1" onchange="s('s1','s2')">
<option value="1">One</option>
<option value="2">Two</option>
</select>
<select id="s2" onchange="s('s2','s1')">
<option value="1">One</option>
<option value="2" selected>Two</option>
</select>
</body>
</html>
|
|
|
|
|
Yes! Thank you a lot!
Regards,
Diego F.
|
|
|
|
|
Using select controls for that doesn't really seem to make an intuitive interface. I would suggest that you just make two radio buttons which represent the A,B and B,A options.
---
single minded; short sighted; long gone;
|
|
|
|
|
Internet Explorer 7 seems to be a horror browser at least with respect to its File Download Capabilities. I came across a few of them today, which I am trying to get a solution that does not impact other IE versions:
I am using the following statement
context.Response.AddHeader("Content-Disposition","attachment;filename=+someFileName);
All works fine till IE 6.
1) Spaces in file name (like "IE 7 Browser.jpg " is rendered as IE_7_Browser.jpg ). It works fine in IE 6 and 5.5 and FF.
2) Even the second line in the 'File Download Dialog Box', it shows as 'JPEG Image' in older browsers but in IE 7, it shows as OISjpeg file.
Regarding problem number (1), I tried the workaround in (http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=940747&SiteID=1[^]) but then the problem comes with ";" (semicolon) in filename. If we have a filename like "IE 7 Browser; Cruel Browser.jpg ", the content disposition dialog shows as
IE 7 Browser
HTML Document
(but when you click SAVE or OPEN it understands that it is a JPEG image).
Any workarounds for these issues in IE 7.
-- modified at 4:38 Thursday 30th August, 2007
|
|
|
|
|
hello frnd,
i am developed a website using ASP i want to set the value in my textbox at runtime but i can't.
my textbox is like
i have tried using
hidTest.value = "Assign"
but failed..
what can i do ????
plz help
regards,
koolprasad2003
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
U can use javascript to set value
|
|
|
|