User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 375,170 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,210 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 2284 | Replies: 5 | Solved
Reply
Join Date: Apr 2007
Location: Nottingham
Posts: 91
Reputation: alienlinux is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
alienlinux's Avatar
alienlinux alienlinux is offline Offline
Junior Poster in Training

Help embedding a cgi script into a html document

  #1  
Jun 4th, 2007
I am trying to embed my cgi:irc script into my html page, it works fine if i simply point a hyperlink to it, but it looks horrible and comes up in a different page, so i tried the <embed> tag like this :-

<embed src="https://alienlinux.homelinux.net/cgi-bin/cgiirc-0.5.9/irc.cgi" align="center" width="520" height="360"></embed>

but it says unknown file type text/html
so i guess i need a type= adding to it but i don't know what to put, can anyone help, tell me what type or put me back on the right path to making this work?
thanks
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jan 2007
Posts: 2,433
Reputation: MidiMagic is on a distinguished road 
Rep Power: 6
Solved Threads: 99
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Posting Maven

Re: embedding a cgi script into a html document

  #2  
Jun 5th, 2007
enbed is deprecated and does not work in all browsers. Use object.
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Apr 2007
Location: Nottingham
Posts: 91
Reputation: alienlinux is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
alienlinux's Avatar
alienlinux alienlinux is offline Offline
Junior Poster in Training

Re: embedding a cgi script into a html document

  #3  
Jun 7th, 2007
I don't suppose anyone knows a good reference for this? the w3schools reference is basic at best and they have no examples. It seems that object also needs a codetype: mimetype; and there is no listings of these. all i have found on google are references to java and flash. so far i have had no luck whatsoever to get anything displayed at all using <object>

thanks for the minimalistic answer that so far caused me no end of grief but how do i use object in this case please?
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 916
Reputation: MattEvans will become famous soon enough MattEvans will become famous soon enough 
Rep Power: 5
Solved Threads: 46
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: embedding a cgi script into a html document

  #4  
Jun 7th, 2007
you don't need all of the fields; try this:
  1. <object type="text/html" width="300" height="300" data="http://url/file.html"></object>
http://3spots.blogspot.com/2006/02/p...es-inside.html

works ok for me in opera 9 and firefox 2.. doesn't seem to work atall in IE6 though.

=musing=
hm.. i wonder, how one would address parts of the inner document using this method? i'm suprised the W3 keep changing their mind about this really, a while back, iframes were supposed to be 'the way forward'.

to be honest, I prefer SSI (server side includes of any breed, not just SHTML) to stick things 'into' pages.. admitadly it forces cache-reduction/elimination, and causes marginally longer fetch times; but at least i don't have to worry about unsupported browsers and deprecated tags, to so much of a degree anyway.
Last edited by MattEvans : Jun 7th, 2007 at 6:08 pm. Reason: ambiguity re. browser versions; bad grammar
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Join Date: Apr 2007
Location: Nottingham
Posts: 91
Reputation: alienlinux is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
alienlinux's Avatar
alienlinux alienlinux is offline Offline
Junior Poster in Training

Re: embedding a cgi script into a html document

  #5  
Jun 7th, 2007
MattEvans
That did it TY!!!!!!!!
omg i can't believe i couldn't find this anywhere put so simply as you did TY TY TY!!!!!

I now have cgi:irc plugged into my homepage and it looks neat! better than popping up in a new window and being on a boring white background. you've given me new hope and vigour to code on!
Thank You so much mate !
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 916
Reputation: MattEvans will become famous soon enough MattEvans will become famous soon enough 
Rep Power: 5
Solved Threads: 46
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: embedding a cgi script into a html document

  #6  
Jun 7th, 2007
lolz.. i think perhaps it was only that i was searching google from a different perspective; since i've personally never used object tags for anything but java/flash/etc in html pages, where you do occasionally need to provide more information in the tag definition.

anyway, the page where i found that code was on the first result for a google search of:

object html inside html

any search like 'object embed html' or 'embed html with object' gives pages that compare the embed tag and object tag, of which there are many.

google respects order of terms, to a higher degree than people sometimes think... i find, the most fruitful complex search queries start with the most important word, then continue with some kind of question, without the words 'how do i', and, in this case, without any words that might pollute the results with uneccessary information. (i.e. embed)

just a tip ^_-

hmm, i suppose you'd need to know that (for the most part) cgi scripts reply in the type "text/html" to know that that was what you needed to search for in the first place; but yes, regardless of the way a page is prepared at server, the request for [data] in object tag expects a reply of type [type] not a file on the server of type [type]; any time you see HTML in the browser window after requesting a cgi-script's data, the script sent data of the type 'text/html' (or 'application/xml+xhtml' =P) so:
  1. <object type="text/html" data="http://whatever.tld/myscript.cgi"/>
Object (checks to see if it can handle the [type] of [data])*, then requests http://whatever.tld/myscript.cgi; myscript.cgi replies with a response typed as [type], and object shows that data using the handler for [type]. It doesn't really matter how the server made that response, as long as it did, and as long as it's the correct type, and is headered as such.

* i assume it does this first, it wouldn't make sense to request data knowing it's unhandlalbe - if i wrote the browser, i would certainly do this check first.
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 11:49 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC