embedding a cgi script into a html document

Thread Solved

Join Date: Apr 2007
Posts: 91
Reputation: alienlinux is an unknown quantity at this point 
Solved Threads: 0
alienlinux's Avatar
alienlinux alienlinux is offline Offline
Junior Poster in Training

embedding a cgi script into a html document

 
0
  #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 :-

HTML and CSS Syntax (Toggle Plain Text)
  1. <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
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,203
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: embedding a cgi script into a html document

 
0
  #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 Quick reply to this message  
Join Date: Apr 2007
Posts: 91
Reputation: alienlinux is an unknown quantity at this point 
Solved Threads: 0
alienlinux's Avatar
alienlinux alienlinux is offline Offline
Junior Poster in Training

Re: embedding a cgi script into a html document

 
0
  #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 Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: embedding a cgi script into a html document

 
0
  #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 7:08 pm. Reason: ambiguity re. browser versions; bad grammar
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 91
Reputation: alienlinux is an unknown quantity at this point 
Solved Threads: 0
alienlinux's Avatar
alienlinux alienlinux is offline Offline
Junior Poster in Training

Re: embedding a cgi script into a html document

 
0
  #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 Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: embedding a cgi script into a html document

 
0
  #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.
Plato forgot the nullahedron..
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC