Web/Script/Content Question
Author
Discussion

egomeister

Original Poster:

7,603 posts

293 months

Saturday 6th May 2006
quotequote all
I'm a bit of a web design novice but i'd like to make a page to compile some text based on the selections of the user.

Basically the user could click check boxes for each item them would like, click a button and the relevant text regarding each of those selections would be generated allowing it to be copied and pasted elsewhere.

I don't have the slightest clue how this would be done - is there some kind of script available to perform this function or is the solution more complex?

JamieBeeston

9,294 posts

295 months

Sunday 7th May 2006
quotequote all
Check google, there will be tons of simple scripts.

But if this is for anything pro / corporate, then I'd advise you get a developer to look into it.

Far too much spamming these days from 'home coders' knocking up a Comments / Contact form with no thoughts or ideas on making the forms secure, and thereby allowing the world and its dog to relay spam through the form.

J

egomeister

Original Poster:

7,603 posts

293 months

Sunday 7th May 2006
quotequote all
JamieBeeston said:
Check google, there will be tons of simple scripts.

But if this is for anything pro / corporate, then I'd advise you get a developer to look into it.

Far too much spamming these days from 'home coders' knocking up a Comments / Contact form with no thoughts or ideas on making the forms secure, and thereby allowing the world and its dog to relay spam through the form.

J


Hi Jamie - what would something like this be called? I have no idea of the lingo!

FYI it's for this page - www.fazedesign.co.uk/ph/events/banners.htm

I basically want to allow someone to select which events they attended and then the page would generate the relevant PH code allowing it to pasted directly into the users profile.

JamieBeeston

9,294 posts

295 months

Sunday 7th May 2006
quotequote all
I'm no developer, but i'll ask one of my Developer Chaps to pop in here

J

egomeister

Original Poster:

7,603 posts

293 months

Sunday 7th May 2006
quotequote all
JamieBeeston said:
I'm no developer, but i'll ask one of my Developer Chaps to pop in here

J


Cheers matey!

GreenV8S

31,024 posts

314 months

Sunday 7th May 2006
quotequote all
You could just have a text field for each link containing the raw HTML that you wanted to copy, with a bit of JScript that selected the whole lot when the field got focus, so that the user just has to 'copy' (crtl+c) and paste into their profile?

ErnestM

11,621 posts

297 months

Monday 8th May 2006
quotequote all
You could do what you want with a bit of PHP and a MySQL back end. However, you will probably need the aforementioned developer to do this...

...alternatively just do a google for php scripts as there seem to be a lot of them out there...

ErnestM

JonRB

80,089 posts

302 months

Monday 8th May 2006
quotequote all
My first thought was PHP too, but I wonder if the requirements might actually dictate client-side scripting such as JavaScript.

Plotloss

67,280 posts

300 months

Monday 8th May 2006
quotequote all
Javascript is the way surely.

As I read it the remit is to take:

Field1
Field2
Field3

and build a string Field1Field2Field3

Doing it at the backend seems overkill to me unless there is other integration required.

JonRB

80,089 posts

302 months

Monday 8th May 2006
quotequote all
Plotloss said:
Doing it at the backend seems overkill to me unless there is other integration required.
Yep - exactly what I was thinking.

ATG

23,816 posts

302 months

Monday 8th May 2006
quotequote all
I'd go down the client-side java-script-populating-a-text-box route, followed by the user copying and pasting the text box's contents. Surely nothing running in the browser is allowed to push data onto the clipboard is it??

egomeister

Original Poster:

7,603 posts

293 months

Monday 8th May 2006
quotequote all
ATG, Plotloss - Thats the kind of thing I'm talking about. I wasn't envisaging using any kind of database, but a piece of code that said "if boxA is checked, then display boxAtext" if you know what I mean.

baxtersweb

41 posts

260 months

Monday 8th May 2006
quotequote all
If it was me then I'd use PHP and MySQL. Partly because I don't know a great deal of Javascript but also because it will be easier to manage.

I'd have a very simple mysql table holding all the information you require such path to image, name, ph code etc. Then just a simple loop with PHP can echo all the images with a checkbox, its id and associated data. When the submit button is clicked then its just very simple PHP to check which checkboxes were checked and use the id's to retrieve the relevant data and show it to the user.

I don't think thats overkill. And when it comes to adding more images, you just make an entry in the database and everything else is done for you

BliarOut

72,863 posts

269 months

Monday 8th May 2006
quotequote all
www.velocityreviews.com/forums/t97323-javascript-or-aspnet.html

Fourth post down looks like a rough outline of what you want.

JonRB

80,089 posts

302 months

Monday 8th May 2006
quotequote all
baxtersweb said:
If it was me then I'd use PHP and MySQL. Partly because I don't know a great deal of Javascript but also because it will be easier to manage.
A classic case of choosing the solution that fits your skills rather than the skills that are appropriate for the solution.

The requirements are all client-side, so why involve the server in a completely unneccessary round-trip? You're proposing sending multiple strings to the server so that it can do simple string manipulation and then re-serve the page content with the manipulated strings. What a waste of server resources and bandwidth!

This is so obviously a client-side requirement, so JavaScript is the preferred solution in this case (and it's not often I say that)