Insert code dynamically

This is a discussion on "Insert code dynamically" within the Web Page Design section. This forum, and the thread "Insert code dynamically are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Nov 20th, 2005, 17:35
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Smile Insert code dynamically

Hi,
im looking at learning how to insert code into a webpage via my browser i.e.

i want to make a maintainence page where I enter the address of an image, title and enlarge image link, then press enter and it creates and saves the relevant code into the page I was modifying i.e. "photo.html". I know that this will take some time and its probably easier just to write the code into the page instead but I want to learn how to do it.

The problem is, I have no idea where to start, could anyone recommend any good sites/books/keywords that might help me, thanks
Reply With Quote

  #2 (permalink)  
Old Nov 20th, 2005, 17:59
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Insert code dynamically

You want to create webpages via your browser?
Reply With Quote
  #3 (permalink)  
Old Nov 20th, 2005, 18:14
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Insert code dynamically

Quote:
Originally Posted by sypher
You want to create webpages via your browser?
not exactly...

i know what you mean. And what you want to can be accheived using a server side language and a database.

give me some more information and we can give u the next step :wink:
Reply With Quote
  #4 (permalink)  
Old Nov 20th, 2005, 18:34
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Insert code dynamically

Ah i think i understand now, you want to create an admin panel which you can use to control the site i.e. adding news, images etc.

As stated this is done with a server side language such as PHP or ASP.
Reply With Quote
  #5 (permalink)  
Old Nov 20th, 2005, 18:37
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Insert code dynamically

hehe tut. sypher, allways one step behind:wink:

Last edited by benbramz; Nov 20th, 2005 at 18:40.
Reply With Quote
  #6 (permalink)  
Old Nov 20th, 2005, 18:40
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Insert code dynamically

Hi,
no i don't want it to make the pages, what im looking to do is make a page which I can use to then make standard modifications of other pages i.e. if I wanted to add a new image at the bottom of a page with other images on, I want to make it so I can put the path to the image, a caption and a enlarge image link then when I click save, i want it to insert the generated code into the file and save it so viewers to my page get the image (this is just an example)

So basically I want to learn a way to generate and insert code into a file.

I don't know if I've explained this any better than my first attempt
Reply With Quote
  #7 (permalink)  
Old Nov 20th, 2005, 18:41
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Insert code dynamically

yes thats exactly what i want to do
Reply With Quote
  #8 (permalink)  
Old Nov 20th, 2005, 18:42
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Insert code dynamically

you can use a cms (content managment system) there are many free ones arorund, for example php nuke
Reply With Quote
  #9 (permalink)  
Old Nov 20th, 2005, 18:53
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Insert code dynamically

oh right,
but i was looking to learn how to make it myself so would you advise i use ASP
Reply With Quote
  #10 (permalink)  
Old Nov 20th, 2005, 19:00
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Insert code dynamically

the thing that is nice about asp is that you can use access databases, which is nice for starting out - as you can edit the database tables more effectivly if your not too confident with using SQL.
Reply With Quote
  #11 (permalink)  
Old Nov 20th, 2005, 19:05
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Insert code dynamically

Right ok, thanks for the help, il look into developing my very limited knowledge of ASP
Reply With Quote
  #12 (permalink)  
Old Nov 20th, 2005, 19:06
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Insert code dynamically

Are there any good sites/books you could recommend me
Reply With Quote
  #13 (permalink)  
Old Nov 20th, 2005, 19:11
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Insert code dynamically

well i know of a good site to learn from:

www.webforumz.com

lmao: I dont mind helping out, what exactly would u need?
Reply With Quote
  #14 (permalink)  
Old Nov 20th, 2005, 19:14
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Insert code dynamically

lol ok, well il have a look at what i need to do and get back to you, thanks
Reply With Quote
  #15 (permalink)  
Old Nov 20th, 2005, 20:04
Most Reputable Member
Join Date: Aug 2005
Location: North Wales, United Kingdom
Age: 21
Posts: 1,093
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to sypher
Re: Insert code dynamically

Theres also alot of tutorials around and articles at the top of web forumz.
Reply With Quote
  #16 (permalink)  
Old Nov 20th, 2005, 21:28
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Insert code dynamically

Quote:
Originally Posted by benbramz
well i know of a good site to learn from:

www.webforumz.com
hehe i know
Reply With Quote
  #17 (permalink)  
Old Nov 21st, 2005, 00:04
Anonymous User
Guest
Posts: n/a
Re: Insert code dynamically

You can't just allow anyone to "insert code into your HTML page and save it" to your web server. That would involve granting anonymous users write access to your web server. You need to save the "code" to a database of some sort, then pull that code into the page at run-time. CMS's do that for you, or you can write your own server-side scripts, and can somewhat use include files.
Reply With Quote
  #18 (permalink)  
Old Nov 21st, 2005, 10:10
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Insert code dynamically

So have I got this right,
I need to write server side scripts to include the database on the page and then enter the parts I want to modify i.e. pictures in the database.
I wasn't wanting to grant access to anyone else, I was just going to use it myself as a control panel and keep it password protected.
Reply With Quote
  #19 (permalink)  
Old Nov 21st, 2005, 12:48
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to benbramz
Re: Insert code dynamically

that exactly what you need.:wink:
Reply With Quote
  #20 (permalink)  
Old Nov 26th, 2005, 14:07
Reputable Member
Join Date: Nov 2005
Posts: 127
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Insert code dynamically

Im completely confused with this now, i decided to use php and mysql.

I thought I needed to insert php code to allow it to access the database into the paga i want viewers to look at (don't want them to be able to change the page at all) so I assumed this would be easy, just insert the code for accessing the database into the page (im not at this stage looking at inserting any code to allow the database to be modified)

I thought if I wanted to make a page for viewing images, I would need fields
image_title, image_description, image_location and image_link (to enlarge it)
so i went away and made a database with those fields and 1 record (just as a test) well i just got to the stage where i was thinking of writing the code to allow the database to be accessed and thought how do I make it so the page displays all the records without adding code for each record, im sure you've probably already explained this to me but im a little thick
Reply With Quote
Reply

Tags
insert, code, dynamically

Thread Tools

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
dynamically create php script nate2099 PHP Forum 1 Nov 13th, 2007 16:08
PHP Code insert into database problem longstand PHP Forum 7 Oct 13th, 2007 22:03
Forcing a 3 row layout dynamically rosh1e Web Page Design 6 Apr 7th, 2007 13:24
Changing URLs dynamically - is this possible? fallen_angel Web Page Design 8 May 16th, 2006 23:31
Drawing lines dynamically gwx03 Flash & Multimedia Forum 5 Nov 28th, 2003 17:27


All times are GMT. The time now is 01:13.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43