Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Use tabs to seperate grids.. how can i...
02/03/2010
20:06
Avatar
kelso
Member
Members
Forum Posts: 11
Member Since:
02/03/2010
sp_UserOfflineSmall Offline

I basically want to click add, and a server action will insert a blank row to mysql (which automatically assigns an ID). I need this to be based on a TID variable which I pass from the url:'server.php?tid=5' in the jqgrid JS. There might be another way to mark such a variable but im still very new to jquery/etc..

I have another script that when a record is inserted based on the TID, it automatically assigns a new VLAN and IP to this particular user (code already works on my old framework, just looking to make a newer better working framework).

I've figured out the select boxes for editing a user and what not, but am unsure of the code used when clicking the add button..

{name:'dataul', index:'dataul', width : 55, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from datatypes"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},{name:'datadl',index:'datadl', width:55, editable: true,edittype:"select",editoptions:{value:"<? $qr = qquery("select * from datatypes"); while ($q = ffetch($qr)) {echo "$q[id]:$q[name];";}?>"}},

03/03/2010
00:20
Avatar
kelso
Member
Members
Forum Posts: 11
Member Since:
02/03/2010
sp_UserOfflineSmall Offline

I guess im just confused about the edit code.. I have in the main page editurl: editsu.php, which is below. However, when i execute a change, it doesnt do anything with this file. I added the die command to verify.

require 'base.php';

die("Success!!");

$operation = $_POST['oper'];

if ($operation == "edit") { qquery("UPDATE customers SET vlan = '".$_POST['vlan']."', datadl = '".$_POST['datadl']."', dataul = '".$_POST['dataul']."', servicetype = '".$_POST['servicetype']."', voicelines = '".$_POST['voicelines']."', freqname = '".$_POST['freqname']."', radioname = '".$_POST['radioname']."', serial = '".$_POST['serial']."', mac = '".$_POST['mac']."' WHERE id = '".$_POST['id']."'") or die(mysql_error());

} elseif ($operation == "add") { qquery("INSERT INTO customers(uname, fname, mname, lname, email, pass, cnumber, level, status) VALUES ('$uname', '$fname', '$mname', '$lname', '$email','$pass', '$cnumber','$level', 2)"); }

03/03/2010
21:39
Avatar
kelso
Member
Members
Forum Posts: 11
Member Since:
02/03/2010
sp_UserOfflineSmall Offline

still no luck getting my editurl to function. I have noticed if i rename the file, it does complain about it not being there. but even with a die("test"); in the 1st lines, the script is never run...

any help would be greatly appreciated!

05/03/2010
13:27
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Please use FireBug and see what is happen when you post the data. Is the url correct - I mean do you have set the correct path to it?

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

05/03/2010
15:48
Avatar
kelso
Member
Members
Forum Posts: 11
Member Since:
02/03/2010
sp_UserOfflineSmall Offline

Tony, after enabling console in firebug (didnt know it even did all that stuff), i was able to figure out what the problem was. I had been using it to inspect elements and doms, but this was the saver for me! Thank you so much!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
58 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information