473,466 Members | 1,464 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 1305
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...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.