Jump to content

static data fill on webpage load

Recommended Posts


I need to get some data whenever page loads (as it is static data not dynamic).

I used onload event but it works only for first text box and i have many text boxes in other tabs also where i need to get data only once.

I tried with addeventlistener but it has some dependency like , button click or clicking anywhere in document.

I want is, load all the static data when ever webpage opens first time without clciking anything.

I have 6 to 7 tabs where many textboxes are there and where the value should be dispalyed on webpage load


Any suggestions how to proceed


Edited by rizwansyed

Share this post

Link to post
Share on other sites

That's what onload should do? you tell it to call a function, that function would go through the textboxes by singular  id, or loop through multiple textboxes by class names for example and updates the values to required value.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...