473,394 Members | 1,965 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,394 software developers and data experts.

Unchecking all checkboxes (or after a certain checkbox) function

Death Slaught
1,137 1GB
I play a game that when your backpack fills with items (the limit is 45) you must choose items to discard by unchecking their box. This is very annoying and time consuming so I was wondering if it were possible to create a Javascript function to be saved as a bookmark, and when used it prompts for the checkbox to start at (so it won't discard items that I want to keep) and discards all items after that point. So my main question is, is it possible for Javascript to manipulate a webpage in this way?

Here is part of the code used:

Expand|Select|Wrap|Line Numbers
  1. <FORM ACTION = maze.php METHOD = post name=battle><input type=hidden name=discard value=1>  
  2.              <br>You cannot carry all of these items!
  3.              Select 45 items to keep.
  4.              The rest will be discarded.<table><tr><td><input type=checkbox name=Item0 value=1 checked></td>
  5.                <td>Forest Sloth Fang (72)</td>
  6.                <td>animal part</td><td><input type=checkbox name=Item1 value=1 checked></td>
  7.                <td>Ridiculous Refreshing Potion (20)</td>
  8.                <td>Restores 5000 HP and 5000 Mana</td></tr><tr><td><input type=checkbox name=Item2 value=1 checked></td>
  9.                <td>Ridiculous Refreshing Potion (20)</td>
  10.                <td>Restores 5000 HP and 5000 Mana</td><td><input type=checkbox name=Item3 value=1 checked></td>
  11.                <td>Ridiculous Refreshing Potion (20)</td>
  12.                <td>Restores 5000 HP and 5000 Mana</td></tr><tr><td><input type=checkbox name=Item4 value=1 checked></td>
  13.                <td>Ridiculous Refreshing Potion (20)</td>
  14.                <td>Restores 5000 HP and 5000 Mana</td><td><input type=checkbox name=Item5 value=1 checked></td>
  15.                <td>Ridiculous Refreshing Potion (13)</td>
  16.                <td>Restores 5000 HP and 5000 Mana</td></tr><tr><td><input type=checkbox name=Item6 value=1 checked></td>
  17.                <td>Scroll of Antaria Warp (2)</td>
  18.                <td></td><td><input type=checkbox name=Item7 value=1 checked></td>
  19.                <td>Keen Claymore</td>
  20.                <td>huge, 20d12 damage, +6 attack</td></tr><tr><td><input type=checkbox name=Item8 value=1 checked></td>
  21.                <td>Keen Claymore</td>
  22.                <td>huge, 20d12 damage, +6 attack</td><td><input type=checkbox name=Item9 value=1 checked></td>
  23.                <td>Keen Claymore</td>
  24.                <td>huge, 20d12 damage, +6 attack</td></tr><tr><td><input type=checkbox name=Item10 value=1 checked></td></tr></table>
Thanks,
{\_/}
(' . ')
(")[DEATH](")
(")(")
Jan 27 '09 #1
1 1833
acoder
16,027 Expert Mod 8TB
@Death Slaught
Yes, GreaseMonkey in Firefox and User JavaScript in Opera. There are also alternatives for other browsers.
Jan 27 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: JIM | last post by:
Hello, I would like to solve the following problem : I've a web site with ex. 5 checkboxes Each checkbox contains the name of a certain task ex. asp:Checkbox 1: Task 1 asp:Checkbox 2: ...
10
by: rn5a | last post by:
All the rows in a DataGrid, including the Header, are accompanied with a CheckBox. I want that when the CheckBox in the Header is checked, then all the CheckBoxes should automatically get checked....
2
by: avanti | last post by:
Hi, I add rows to my table dynamically, with a checkbox in each row in the first column. The checkbox in the header row acts as a 'Select All' checkbox. Whenever it is checked, checkboxes in all...
10
by: manojsingh | last post by:
hi, This is my program and it is resluting same message "checked" everytime, either i checed it or unchecked the given checkbox. Please have a look . <html> <head> <title>Customer...
4
by: Ed | last post by:
I'm writing a VBA macro in Word 2003 that finds and manipulates a web page (Win XP, IE6 sp2). I am having trouble with a checkbox. I can find the checkbox and make it checked, but I can't figure...
0
by: prpleprncs | last post by:
I have a form that has a five checkboxes. Two of the checkboxes (let's call them box4 and box5) cannot both be checked. For example, if box4 is checked, box5 will uncheck and vice versa. I am new...
4
by: ameshkin | last post by:
I have a checkbox with an ID of svc_tp_1, and an image that corresponds with this checkbox below it. <input type="checkbox" name="checkbox" id="svc_tp_1" value="svc_tp_1" / <img...
13
by: PhpCool | last post by:
Hi, since sometime I'm stuck in a problem where I want to check or uncheck all the checkboxes. If I'm choosing name for the checkbox array as 'chkbx_ary' then I'm able to check/uncheck all the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...
0
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...

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.