|
Is this what you need?
<html>
<head></head>
<body>
<form action="#" method="get">
<input type="button" value="Click Me" onclick="location.href='http://www.cnn.com';" />
</form>
</body>
</html>
"we must lose precision to make significant
statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
How can I do in hmtl and embedded javascript, to list the contents in a local client folder?
|
|
|
|
|
I'm stretching here, because I know there is a fundamental difference in the way the server interprets the two, but I have a new ASP.NET control that emulates part of the functionality of my legacy PHP pages.
Is there any way that anybody has come across to display an ASP.NET control within the PHP page? It's basically a souped-up menu, so the drop-down parts of it exclude use of an IFRAME. Some sort of in-line scripting in an included file, perhaps?
It's an interesting problem. Any ideas?
|
|
|
|
|
In using javascript...
i'm trying to read content from an html document within an iframe cause I want to reformat the content.
In IE6 I can have the embedded web page set the status bar, and then I get read that from a script in the main page. (Or I can set the clipboard data and read the clipboard from a script).
None of this works in Mozilla 1.6 (Mozilla/5.0). But can something be made for Mozilla that will take data from an iframe's content and feed it into a variable of the web page?
VB Script could be okay or maybe a java applet available across the internet.
Thanks.
|
|
|
|
|
In your main file, you could have something like:
<html>
<head></head>
<body>
<form action="#" method="post">
<input type="button" value="click me" onclick="alert( aVariable );" />
</form>
<iframe src="o.html" width="300" height="300">
</body>
</html>
and, in o.html, you could have
<html>
<head>
<script type="text/javascript">
parent.aVariable = 500;
</script>
</head>
<body>
Moo.
</body>
</html>
The HTML file in the IFRAME sets a JavaScript variable in the parent document that the parent document can access.
"we must lose precision to make significant
statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
Thanks. I hadn't tried that.
Anyhow that does work if I put both files on my web server.
But I didn't mention something that has seemed to gain more significance...
The web page in the IFRAME is at a different IP addresss. This seems to stop the transfer through the aVariable -- homeland security or just internet web browser security issue.
|
|
|
|
|
That's right. You can't access information across windows that have different server endpoints. I know of no work-around for it. And, if I found one, I'd tell the browser's author to get them to close the security hole!
"we must lose precision to make significant statements about complex systems."
-deKorvin on uncertainty
|
|
|
|
|
I was able to put the following into the html document called by the iframe:
window.status="test data"
Since IE6 has only 1 status bar text buffer the text can be read from the main html.
Mozilla seems to give each opened html document a separate status buffer.
I may not have to rely on a trick like this, but I was still seeing if there is a solution.
Now if everything were originating from the same web server, this probably would be easier to solve...
|
|
|
|
|
Hai ,
I am having a html page. Inside I am having a textbox, a dropdown with static values and a html button.
I need to do a searching when user specify some text(piece of text) in side the text box and click the button. The searching should do inside my specified folder for some word documents.
Suppose I am having a word doc 'dem.doc' inside the folder C:\NewFolder.When user specify demo in the given text box, and clik the button, I need to open the specified word doc.
Is it possible by using only html and or javascript.
Please show me the right way.
Thank You,
Rahul.P.Menon
"Truth cannot be make hidden for long time. Becoz it is programmed to become visible"
|
|
|
|
|
The following code will hopefully do what u want:
function openWordDocument()
{
specificFolder="c:\\NewFolder";
var fso;
fso = new ActiveXObject("Scripting.FileSystemObject");
if(fso.FileExists(specificFolder+"\\"+f1.t1.value))
{
document.URL=specificFolder+"\\"+f1.t1.value;
}
else
{
alert("File does not exist");
}
}
Dheeraj Grover (spicymails@gmail.com)
|
|
|
|
|
A quick question:
given the following html-fragment:
<div id="mydiv">
<input type="text" value="abc" id="text1" name="text1" />
</div>
then
element = document.getElementById("mydiv");
var my_data = element.innerHTML;
if I do alert(my_data);
I get "<input type="text" value="abc" id="text1" name="text1" />"
if now I change the value on the window and make it "xyz" and do an alert,
IE gives me : "<input type="text" value="xyx" id="text1" name="text1" />"
but Firefox still gives: "<input type="text" value="abc" id="text1" name="text1" />"
how can I fix (or unfix) so firefox also gives me xyz? Only using innerHTML, as I do not want to go the dom way for this problem.
-- modified at 7:56 Wednesday 16th November, 2005
|
|
|
|
|
Easiest way, put this before the code that retrieves innerHTML :
var text = document.getElementById('text1');
text.setAttribute('value', text.value);
|
|
|
|
|
Thanks. That worked.
...think concepts, teach to learn...
|
|
|
|
|
Hi,
Is it possible to download acrobat reader automatically if it is not installed on clients machine
when he views a Pdf file from the browser?
I want the script for downloading adobe acrobat reader.
Here is my code:
<object id="TestAcrobat"
type="application/x-pdf" style="height:100%; width:
100%" classid="clsid:CA8A9780-280D-11CF-A24D-44455354
0000" viewastext="">
<param name="src"
value="http://localhost:/testprj/ds/english/932-013M.pdf" />
In the above code,codeBase has to be specified for
the object. I want [b]CAB file[/b] for adobe acrobat
reader so that I can give it as the codeBase.
Please check the above code and make corrections
if necessary.
Waiting for ur reply.
Send ur reply to: kkriskiran@gmail.com
Thanks in advance,
K. Krishna Kiran.
k.krishna kiran
|
|
|
|
|
Hi, everybody!!
I'm doing a project on C# web application. I need to design a web page and a search engine. I need to design a search engine using the calendar to select the particular date we have click. I have drag and pull the calendar icon. Anyone could tell me the code that if i select on the date i've choose it will show me the database. Anyone who can help me with this.Thank! Your help will be appreciated..
Cheers!
|
|
|
|
|
Hi there,
What you might need to do is to create an event handler for the SelectionChanged event of the Calendar[^] control. In the event handler, you can get the selected date from the SelectedDate property and execute an SQL command to query data. If you don't know about the ADO.NET, then the documentation[^] can get you started.
|
|
|
|
|
Hi,
I am after some source that generates obsured images of random alphanumeric sequences as a test for human user.
There was something on The Code Project that did this but I lost the link and cannot find the artical.
I think it was either APS or JSP ?
Many thanks in advance.
Aaron
|
|
|
|
|
|
Yes, thanks, I found it in the end.
Theres a good artical on it on WikiPedia
Many thanks anyway,
Aaron
|
|
|
|
|
Hi all,
In my application user can upload some images on server, if user upload single image on server (it's no problem, uploaded) but if user try to upload multiple images on single time so it creates a problem , so how can i achive this task.
and also how i can check one by one and save this images on database....
i m using Asp.net...
thanx
Sajjad
|
|
|
|
|
Can we use multiple input file elements?
|
|
|
|
|
Hello,
I have done such a task in my project. Try following.
Dim b1(file1.PostedFile.InputStream.Length - 1) As Byte
Dim b2(file2.PostedFile.InputStream.Length - 1) As Byte
file1.PostedFile.InputStream.Read(b1, 0, file1.PostedFile.InputStream.Length)
file2.PostedFile.InputStream.Read(b2, 0, file2.PostedFile.InputStream.Length)
Dim strimage1type = file1.PostedFile.ContentType
Dim strimage2type = file2.PostedFile.ContentType
Dim parmBlob1 As New SqlParameter("@image1", SqlDbType.Image, _
b1.Length, ParameterDirection.Input, False, 0, _
0, Nothing, DataRowVersion.Current, b1)
Dim parmBlob2 As New SqlParameter("@image2", SqlDbType.Image, _
b2.Length, ParameterDirection.Input, False, 0, _
0, Nothing, DataRowVersion.Current, b2)
cm.Parameters.Add(parmBlob1)
cm.Parameters.Add(parmBlob2)
Might be helpful.
anil
|
|
|
|
|
Hi,
Can we add web user controls to the intellisense in visual studio .net.
Thanks
Muzammil Ahmed
|
|
|
|
|
In the VS 2003, the web user control only supports the intellisense in the code editor, while the VS 2005 supports both in design view and in code editor.
|
|
|
|
|
Help!
I would like to know. I am running VS 2005 beta with SQL 2005 beta. When running the Website Admin tool to create roles and users the site keeps on saying enter a different password. I do not know how to get past that.
Does anyone else have this problem?
thx
Illegal Operation
Making Computer Software Talk
|
|
|
|