Delphi For PHP Forums    


Go Back   Delphi-PHP Forums > Website Design > General Website Design
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

General Website Design General discussions about website design can be found here.

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 18th March 2009, 17:24
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,480
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

See if this helps, Show a Unit

If not then ask again maybe with a little more detail as I must not get what you are trying to do.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #12 (permalink)  
Old 18th March 2009, 17:47
D4PHP User
 
Join Date: Aug 2007
Posts: 23
philfred is on a distinguished road
Default Dynamic more info

Hi!

No Sorry doesn't help me :-(

I will try and explain what I am trying to do....

Each Page of the form will by dynamically built at run time from a txt file.

So the first page which will be login will be built when a user completes security correctly - page2 and links to page3 etc...

I have moved on to looking at doing it with Panels - which ironically is how the hardcoded one works....in that I have

4 panels...

Panel1 is logon
Panel2 is the vote
Panel3 is the vote
Panel4 is the confirmation

I generate all the panels at design time hide the unsed panels and then move them up the screen as required!....

If you follow this link

https://www.castavote.co.uk/cms/agm/

[Dont worry about the security warning if you go to the root at www.castavote.co.uk and then try demo no warning]

This is the running demo that we have used succesfully for several clients now....

Security1 32119
Security2 GRKI92Ug

If you dont confirm your vote you can go back and re-use it, its only a demo so if you confirm you will get an email saying thanks....

Its all written in php5 using delphi and It's been used and a variation of this on about 5-10 different campaigns - the busiest with 6500 hits... :-)

BUT - the big problem is it's all harcoded up so the form has to be modifed per client the responses per client the layout per client - a nightmare...

I want to build the same dynamically..!

I worked out that maybe I could go back to using panels but with layers dynamically but that just seems to give me wierd results - like no output - or sometimes!....

I hope this gives you an idea of what I am trying to do!

Thanks
Phil

Last edited by philfred; 18th March 2009 at 17:48. Reason: Security Warning - IGNORE IT!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #13 (permalink)  
Old 18th March 2009, 20:50
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,480
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

OK, seems easy enough to me, but of course I don't have to code it.

If they are all basically the same as the demo I would personally do it almost entirely in js using js arrays and then pass the info back to the server. Using pointers to keep track where I am in the arrays and I would just change the innerHTML of labels to the QuestionsArray and the captions of the radio groups to the AnswersArray.

If I didn't know any js I think I might try the same idea with php arrays. And just keep rebuilding one panel.
Let's say a textfile could look something like this.
PHP Code:
$QuestionsArray=array (=>
"question1",
"question2",
"question3",
"question4");
$AnswersArray=array (
=> array("a" => "orange""b" => "banana""c" => "apple""vote" => "")
=> array("a" => "orange""b" => "banana""c" => "apple""vote" => "")); 
Store the selection in AnswersArray[x][vote].

Another easy idea would be to use dbrepeater and store questions and answers in a db which you limit with the limit count and use hiddenFields to paginate.



fwiw I get errors on the demo of the vcl-bin not serving up the common.js.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #14 (permalink)  
Old 18th March 2009, 22:17
D4PHP User
 
Join Date: Aug 2007
Posts: 23
philfred is on a distinguished road
Default more help

Hmm...

You said

Another easy idea would be to use dbrepeater and store questions and answers in a db which you limit with the limit count and use hiddenFields to paginate.

I dont know anything about this component - thanks for the info about common.js will check it out.

I have moved on from where i was but have a really wierd problem...

I have the components on a panel on a layer, all work on first layer but the components generated at runtime dont appear when i change the layer just the design time - could this be a parent issue?

Thanks
Phil
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #15 (permalink)  
Old 18th March 2009, 23:37
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,480
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

This is the 'book' on dbrepeater
Developer's Guide :: Displaying Information - Delphi for PHP Documentation Wiki

Are you assigning parent?

You should be able look in your browser source and make sure your 'homemade' items look just like the dropped on ones do.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #16 (permalink)  
Old 20th March 2009, 11:43
D4PHP User
 
Join Date: Aug 2007
Posts: 23
philfred is on a distinguished road
Default fixed this

Hi!

Solved it I needed to put the code in on the before show event! - quite logical really!

Have two other quick questions? I could do with a little help on!

1) Is it possible to create a dynamic button and then link this to an event ? - also tried to clone a label which had a click through that was designed on the form but couldn't get that to work...

2) Maybe easier - I use the radio button group for the voting but the headings like For, Against etc - I have to work out manually is there a way i could force the component to put titles out in the first row ? - I can see it creates these as a table so would make life a lot easier?

Thanks for all the help so far !
Regards
Phil
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #17 (permalink)  
Old 20th March 2009, 12:58
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,480
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

1. yes. The easiest way of doing these types of things is to create what you want with the ide and run it. Then look in the browser source and copy the output and just modify the parts that you need to and output the same dynamically.

2. Do you mean with dbrepeater? If so I just put my headers above the dbrepeater.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #18 (permalink)  
Old 20th March 2009, 17:52
D4PHP User
 
Join Date: Aug 2007
Posts: 23
philfred is on a distinguished road
Default

2. No I mean i dynamically createa radiogroup and across the top of the radiogroup i have created (horiziontally) I want a heading above each selection...

e.g

FOR AGAINST
o o

Hope this makes sense!
Regards
Phil
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #19 (permalink)  
Old 20th March 2009, 23:18
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,480
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

Same answer
Quote:
The easiest way of doing these types of things is to create what you want with the ide and run it. Then look in the browser source and copy the output and just modify the parts that you need to and output the same dynamically.
As part of outputting your rg also output the labels to go over them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #20 (permalink)  
Old 23rd March 2009, 19:37
D4PHP User
 
Join Date: Aug 2007
Posts: 23
philfred is on a distinguished road
Default A sort of fix

Thanks!

Looked at that and couldn't quite get what I wanted so found the routine used to output in extctrls.inc.php and did a copy and change so that if TAG 999 is used the radiobuttons disappear and it treats it like text - which means I can ouput above the table and it all lines up in columns! - which is great!

One Problem though I am trying to access the font properties as

$myradiohdr = new RadioGroup($this);
$myradiohdr->Alignment=agNone;
$myradiohdr->Layer=0;
$myradiohdr->Columns=3;
$myradiohdr->Height=40;
$myradiohdr->Font->Size="12px";
$myradiohdr->Font->Weight="fsbold";
$myradiohdr->Orientation=OrHorizontal;
$myradiohdr->AddItem('For');
$myradiohdr->AddItem('Against');
$myradiohdr->AddItem('Chairman');
$myradiohdr->left=10;
$myradiohdr->Top=$nextposition;
$myradiohdr->Width=500;
$myradiohdr->Tag=999;
$myradiohdr->Parent=$this->Panel1;

And it seems to ignore me when I set the font properties? Any ideas?

Many thanks
Phil
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

« SEO Basics | - »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 05:14.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright © 2004 - 2009, G&J Solutions Ltd. All Rights Reserved. terms of use