NYCPHP Meetup

NYPHP.org

[nycphp-talk] Can I ask a DHTML question

Mark Jia markjia at yahoo.com
Tue Oct 22 21:25:50 EDT 2002


Thanks for all, actually I can't use hide fields since there is a number limit, also I can't use server side script since there are heavy loads on servers, I know server side is safe and will work absolutely, but I try to resolve it on client side.
Hi Jose, 
Could you give me one or more websites using the way you said here? I think that is the way I am looking, I remembered one was on Ebay, but it was removed recently.
Thanks for all!
Mark
 Jose Villegas <villeg2 at nyc.rr.com> wrote:In Explorer 5 and Netscape 6 you can actually create elements on the fly
and insert them anywhere in your document. I've done this successfully
with tables and table rows. I'm not sure if this works for all html
elements, but give it a try.

This is a way it works with tables:

Let's say I have a div tag in my html document like this:


With JavaScript I can create a table element like this:
var newTable = document.createElement("table");
newTable.width = "300";
newTable.style.backgroundColor = "blue";
newTable.border = 1;

I can then append the table to the html document like this:
var x = document.getElementById("placeHolder");
x.appendChild(newTable);

Of course, with tables I also have to create and append all the table
elements.

hope this helps,
Jose

----- Original Message -----
From: "Mark Jia" 
To: "NYPHP Talk" 
Sent: Tuesday, October 22, 2002 2:38 PM
Subject: [nycphp-talk] Can I ask a DHTML question


>
> I got an interface project, but I never be an interface programmer, I
think a lot of people out there could know this or could give me some
hints, here is my problem:
> I have one text field and a button, if user want to ask for another
text field, user just simply click on the button, then another text
field will be generate right after the previous text filed, user can
generate unlimited fields, this function should work for both IE5.0+ and
Netcape4.0+.
> like this:
> ------------------------- 
----------------------------------------
> Enter your account : | |
|click if you have more accts|
> -------------------------- 
-----------------------------------------
> when user click on "click if you have more accounts", another text
filed will be generate right on the next line.
> I know it will use Javascript, also some knowledge about windows DOM
structure, I didn't find some similar website, could you give me some
hints? or give me a website using this kind of text fileds.
> sorry it is not a PHP question.
> Thank you for your help!
> Mark
>
>
> Regards
>
> Mark Jia




--- Unsubscribe at http://nyphp.org/list ---



Regards

Mark Jia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20021022/00325992/attachment.html>


More information about the talk mailing list