473,320 Members | 2,107 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

javascript problem

i placed an html button on a C# asp.net webform and placed the following html
code in the html/aspx file:

<TD style="WIDTH: 147px"><INPUT onclick="history.go(1)" type="button"
value="Go Back"></TD>

but now i have to use a variable instead of "1" bec. the no. of pages to go
back to is computed on the server side. i placed a textbox in the webform to
hold the value. so here's what i got so far:

<TD style="WIDTH: 147px"><INPUT
onclick="history.go(document.Form1.txtRowCount.val ue)" type="button"
value="Go Back and make changes"></TD>

but when the button is clicked, nothing happened. pls. help and thanks in
advance.

Nov 17 '05 #1
3 1301
try:

<TD style="WIDTH: 147px"><INPUT
onclick="history.go('" + document.Form1.txtRowCount.value +"' )" type="button"
value="Go Back and make changes"></TD>


so thats single quote, double quote, plus, your variable , plus, double
quote, single quote

cheers CR
Nov 17 '05 #2
i tried it but now i'm getting an error.

"CodeRazor" wrote:
try:

<TD style="WIDTH: 147px"><INPUT
onclick="history.go('" + document.Form1.txtRowCount.value +"' )" type="button"
value="Go Back and make changes"></TD>


so thats single quote, double quote, plus, your variable , plus, double
quote, single quote

cheers CR

Nov 17 '05 #3
it's now working. i forgot that the value should be negative. thanks.

"CodeRazor" wrote:
try:

<TD style="WIDTH: 147px"><INPUT
onclick="history.go('" + document.Form1.txtRowCount.value +"' )" type="button"
value="Go Back and make changes"></TD>


so thats single quote, double quote, plus, your variable , plus, double
quote, single quote

cheers CR

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Kai Grossjohann | last post by:
It seems that Ctrl-N in Mozilla opens a new empty browser window. That's fine, I don't need to do anything about it. But Ctrl-N in IE appears to clone the current window. Is there a way to...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
6
by: Alex Rast | last post by:
First of all, this is not a programming question. I'm a user, not programming in JavaScript. I'm not, however, a novice user or even a power user - I certainly know programming intimately as well...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.