Welcome Guest, Not a member yet? Register   Sign In
What can I use to simplify the process?
#1

(This post was last modified: 04-11-2015, 02:37 PM by lexxtoronto.)

Code:
<textarea name="lists" rows="1" cols="20" id="list_2" onclick="doUpdate(this.value, this.id,this.name)">Medium $1.40</textarea>

And then doUpdate() brings up a prompt box, collects the new value from the prompt box (for example change Medium $1.40 to Medium $1.50), all other info and then makes an ajax call, which changes a relevant entry in the database.

As of now the html code above is hand coded. Ideally I would like a php function to query the database and then generate the html code. For example if id is list_X then it would be an li element. Im planning to do it when running a foreach loop.

Is there a simpler way of doing it? Ive never used json or xml - can I use them here and how? Thanks
Do the one thing you think you cannot do. Fail at it. Try again. Do better the second time. The only people who never tumble are those who never mount the high wire.
Reply
#2

create a html helper. json nor xml have nothing to do with this
Reply
#3

That's a good idea, thank you
Do the one thing you think you cannot do. Fail at it. Try again. Do better the second time. The only people who never tumble are those who never mount the high wire.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB