|
I would like to change Text on a webpage on the fly. I know about the innerText property for ie. I cann't use this however becuase I am not using ie. Or netscape for that matter. I need a way that is very browser nonspecific. Is there anyway to do this using javascript or JSP. I want to be able to change the text on the screen without reloading the page.
Thank you.
Mardigin.
|
|
|
|
|
hi..
you can put that portion that changes in a separate frame(myFrame)..
then make a link with target = myFramee .. when the user clicks the link the page in (myFrame) loads with new values So you can make it in asp to accept arguments..Got it ?
|
|
|
|
|
|
Hello:
I want to try writing perl scripts on Windows 2000 Professional, for a web application. I am using IIS 5.0 as web server.
How can I do that? Any advices or links to examples will be highly appreciated. Thanks
~~~~Pankaj~~~~
Follow your goals, Means will follow you ---Gandhi---
|
|
|
|
|
Here[^] is the binary download for Perl on WinNT. I don't know whether it will work on Win2KPro, but you might try it out. You can also download the source files from the same site - perhaps you can tweak it to run with IIS5.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
|
Hi,,
I make a page Save.asp that gets some data from a form in another page.. (method=Get)
Save.asp saves data to a DB then displays a success message..
the problem :
when the user press (Refresh or reload) in the browser the data is saved again..
How to prevent this from happenning ?
|
|
|
|
|
hspc wrote:
when the user press (Refresh or reload) in the browser the data is saved again..
HS,
Please post your code!
I believe I have seen this kind of thing before.
Tony
|
|
|
|
|
Having a stab here...
Try Request.ServerVariables("HTTP_REFERER") in Save.asp to see where they came from. If coming from Save.asp then the refresh is happening.
I'm not really sure if this would work, but I'd giv this a go first. Failing this, I would then think about either passing a variable from the first page to the second, or use Session("SessionID") which is unique per browser ..ie
(SQLServer7)
sSQL="IF Exists(SELECT * FROM tblInsert WHERE sessionID='"&Session("SessionID")&_
"') SELECT -1 ELSE BEGIN"&_
" INSERT INTO tblInsert(fields...)VALUES(values...);"&_
" SELECT 0 END"
run this, if -1 then already inserted
OR
set a session variable to say that this user has already submitted (if allowing for multiple submissions from same session, get the input page to reset the session variable)
Actually, I like the last the best, if REFERER fails.
Dave McRae
|
|
|
|
|
Thanks..
I loved the REFERRER Idea (even though I did not try it yet)
I think the Idea of SessionID will prevent the user from enterring new data in the same session .. also SessionID can be assigned to another user after the current one logs off.
the session variable is also great
the way I make it now is to let the save page redirects the user to another page (I don't like it coz it needs to make a trip to the client..Also won't work if a proxy exists)
|
|
|
|
|
ahh - yeah - I dont mind the redirect idea
(There are many ways to skin this cat )
also response.transfer (if you're using IIS5.0 or better - not an option with IIS4.0) would solve your worries with page redirects and be very good looking!!
Dave McRae
|
|
|
|
|
Response.Transfer??? Are you sure?
I think Server.Transfer.
But if we use Server.Transfer, we can not solve the problem because all submitted data still existes.
|
|
|
|
|
You're right, Server.Transfer
I've not tested server.transfer at all as the most influential of my clients can't bring themselve to move from NT4 as yet, but I understand it doesnt go back to client like response.redirect, but leaves execution from that point in the page where server.transfer was encountered and re-commences at the top of the page transfered to, like an #include only dynamic.
Yep - all the data exists, but I would imagine you'ld be transfereing away from the save page.
I should give this a bit more of a test - sorry about the bum steer if I gave 1.
Dave McRae
|
|
|
|
|
Hi all, I have a little problem with a JSP page I'm trying to develope. I need to check the value of a combo box in the page, but there are a different number of combos each time. The way I thought it would be the best is passing to the JavaScript function the name of the combo, like this:
<----------------------------------->
<----------------------------------->
The problem I have is, let's say I call the function with code = 1; I can't change "t" value from document.makers.code.value to document.makers.1.value. If I do this I have everything else done...
Thanks in advance for your help,
JaviGimenez
|
|
|
|
|
This isn't a direct answer, but maybe the concept is helpful:
<html>
<head>
<title>Test</title>
<script language="javascript">
<!--
function checkObj(theObj) {
var temp = theObj.value;
alert(temp);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF">
<form name="theForm">
<input type="text" name="text1"> <input type="button" value="Send This Object" onClick="checkObj(document.theForm.text1)"><br><br>
<input type="text" name="text2"> <input type="button" value="Send This Object" onClick="checkObj(document.theForm.text2)"><br><br>
</body>
</html>
Paul
-- modified 18-Jul-18 11:59am.
|
|
|
|
|
Okay, here's something more useful
function blah(obj_name){<br />
var temp;<br />
eval("temp = document.form." + obj_name + ".value")<br />
<br />
}
Paul
I don't think anyone should write their autobiography until after they're dead. - Samuel Goldwyn
modified 18-Jul-18 11:59am.
|
|
|
|
|
Is it possible to import html data from a file into
a table?
I'm trying to cut down on my page sizes, and I'm finding that if I change the navigation pane on one page I then have to go and change EVERY page to match it... Instead I would like to just have ONE file that contains the code for the navigation pane that I can load into each page as it comes up???
Any ideas?
|
|
|
|
|
Anonymous wrote:
Is it possible to import html data from a file into
a table?
Sure! Save the HTML as Text data, and retrieve it using ADO, then use ASP to spit it out at the proper place in the page(s).
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
thanks..... i'm going to have to do some research to fingure out what you mean by ado and asp.... but THANKS!
-Cope
|
|
|
|
|
Sorry.... ADO is a way to access databases from a web page - it's more than that, but that's all you're concerned with right now. ASP is the Active Server Pages technology used to create HTML on the fly using scripts which execute on the server. The output of the server script is a text stream containing HTML. You can store your HTML on an Access table, then in your ASP script create a connection to the table using ADO commands. Through that connection you then query the database table to retrieve the HTML to a string variable and send it to the client using Response.Write. There are some excellent articles on both ASP and ADO here at CodeProject, and I suggest that you spend some time reading them. Here[^] is a great starting point.
"The Lion shall lie down with the Lamb; but the Lamb will not get much sleep..." Lazarus Long
|
|
|
|
|
Depends a lot on what you are using. The simplest way of accomplishing what you want is a frameset. All you navigation would be in frame, loaded from one page, while the content is in another.
You could also use and xml document and transform it on the page. With ASP you could read from a flat file and create the links or read in the entire table. ASP.NET you could either use a User Control or create a custom control, or combinations of all. The possiblities depend one what you know and what you can use.
|
|
|
|
|
I suggest you go for either frames or server side includes...
|---------------|
| theJazzyBrain |
|---------------|
|
|
|
|
|
I have a logon page. I would like to automatically set focus on the user name text box. Any idea how to do it?
Here is the text box code:
<form id="login" method="post" runat="server"><asp:Table id="Table1" style="Z-INDEX: 101; LEFT: 45px; POSITION: absolute; TOP: 63px" runat="server" Width="181px" Height="95px"><asp:TableRow Font-Size="10pt" Font-Names="Verdana"><asp:TableCell Font-Bold="True" Text="Name:"></asp:TableCell>
<asp:TableCell><asp:TextBox runat="server" ID="tbName"></asp:TextBox></asp:TableCell></asp:TableRow>
The TextBox class doesn't seem to have a Focus() method.
Thanks for any assistance
|
|
|
|
|
The easiest way is to use the ONLOAD event of the BODY element. So body onload="document.txtTest.focus();"
ASP.NET rather strangely forgot to include a focus method for input fields. AFAIK there is a user control out there on the web you can download to get around this.
Paul Watson Bluegrass Cape Town, South Africa
Roger Wright wrote:
Personally, I'm seeking a red-headed, double-breasted mattress thrasher
|
|
|
|
|
I have an HTML frameset page with 2 frames. In the left frame, I have a menu containing several buttons. For each button I have an "Onclick" event that calls the Javascript window.open() function. Basically, this function just loads the results of a Perl script (*.pl) into the right frame.
For example, the button to add a customer calls:
window.open("AddCustomerToDatabase.pl", "right frame");
I also have a "show all customers" button that loads another Perl script which will retrieve all customers from a database and display them in nice table on the screen. This script also loads into the right frame, replacing the existing content.
The problem I have is that I notice that the window.open() function does not load a FRESH page. (Evidently, I dont see the IE status/progress bar at the bottom showing any activity).
For example, first I click "show all customers" and I see a table with 4 customers. Then I click "add customer" which loads a form (into the same right frame) in which I fill out the new customer information, and then submit it. Then when I click "show all customers" again, I still see the same table with only 4 customers, and not 5. Only when I click IE's "refresh" button will the updated table be displayed. I am using MySQL database, and I am positive that the submitted customer info is updated in the database immediately when i clicked submit. (I have checked that).
I find it weird that window.open() doesnt load a fresh page each time. It only loads a fresh page during that page's first load. Can someone suggest me a way to force a fresh load each time?
I thought about using window.location = http://blahblahblah.pl, but then there is no way to specify the target frame. Please help. Thanks.
|
|
|
|