From: Greg Maxey on 28 Feb 2010 11:47 Ronx, The scrollable HTML container works fine. I am using: <pre style="height: 150px; border: 2px solid orange; padding: 5px; width: 875px; overflow: scroll;>Code goes here</pre> I don't know that much about HTML so "CSS" and "External Style Sheet" are terms that I don't fully understand. Right now when I need a HTML contrainer at a new location in the same or a different page, I am simply copying and pasting the string of code shown above. There is probable some way that I could define one of these containers and then add it to the menu. I would place my cursor in the a the point I wanted to insert an empty container and click Insert>HTML container. Any ideas or suggestions as to how to go about doing that? Thanks. Ronx wrote: > No - A form field area can only be pre-populated in Code view. > You could try a scrollable HTML container instead, for example: > > <pre style="height: 300px; border: 1px solid red; width: 600px; > overflow: scroll;"> > Code goes here > </pre> > The CSS would be best placed in an external style sheet which can be > accessed by multiple pages. > The border is only for decoration. > > I use a similar method on my pages , for example: > http://www.rxs-enterprises.org/fp/articles/2008/01/03/02/Validating_Email_Addresses.aspx > > "Greg Maxey" <gmaxey(a)mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in > message news:#Rh7IUxtKHA.3408(a)TK2MSFTNGP06.phx.gbl... >> Ronx, >> >> I suppose that I can make this work, but it seems combersome to work >> with. Is is possible to insert the text area as you have shown but >> then be able to paste in text while I am in designe mode? As it is, >> I am putting in the text using the code view: >> >> >> Ronx wrote: >>> The text area can be made read-only: >>> >>> <textarea name="TextArea1" style="width: 600px; padding: 5px;" >>> readonly="readonly" rows="10">code goes here</textarea> >>> >>> >>> >>> "Ronx" <ronx917(a)hotmail.com> wrote in message >>> news:edsURSvtKHA.3360(a)TK2MSFTNGP06.phx.gbl... >>>> Use a text-area - but why bother to lock it? >>>> If the text area is not within a form changing the contents is only >>>> going to affect the user - not your website. Users can change the >>>> code after they paste it into their applications anyway. >>>> >>>> When inserting the text area into the page remove the <form ...> >>>> and </form> tags that go with it to disable any chance of >>>> submitting the field back to the website. >>>> -- >>>> Ron Symonds >>>> Microsoft MVP (Expression Web) >>>> http://www.rxs-enterprises.org/fp >>>> >>>> Reply only to group - emails will be deleted unread. >>>> >>>> >>>> >>>> "Greg Maxey" <gmaxey(a)mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in >>>> message news:uzMK5iutKHA.4568(a)TK2MSFTNGP05.phx.gbl... >>>>> I am not sure if this is the correct forum or not. >>>>> >>>>> I use FrontPage to manage my personal website and I am one step >>>>> above a novice. On several of my pages I post rather lengthy >>>>> clips of VBA code. I would like to display this code in some sort of >>>>> fixed sized text field where visitors could scroll to read or >>>>> select and copy the text. I have found on the Insert menu a >>>>> Form>Insert Text Area control that >>>>> almost suit the bill if I could only figure out how "lock" it so >>>>> that the content cannot be altered by visitors. Can this be done >>>>> or is there a more appropriate type of control to use for my purpose. >>>>> >>>>> Thank you. >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> Greg Maxey >>>>> >>>>> See my web site http://gregmaxey.mvps.org >>>>> for an eclectic collection of Word Tips. >>>>> >>>>> Arrogance is a weed that grows mostly on a dunghill (Arabic >>>>> proverb)
From: Greg Maxey on 28 Feb 2010 12:29 Ronx, There may be a better way, but I scratched together my first FrontPage VBA procedure which seems to do the trick. I added the macro to the Insert menu: Sub InsertHTMLContainer() Dim objRange As IHTMLTxtRange Set objRange = ActiveDocument.Selection.createRange objRange.collapse False objRange.pasteHTML "<pre style=""height: 150px; border: 2px solid orange;" _ & "padding: 5px; width: 875px; overflow:scroll;""> </pre>" End Sub Greg Maxey wrote: > Ronx, > > The scrollable HTML container works fine. I am using: > > <pre style="height: 150px; border: 2px solid orange; padding: 5px; > width: 875px; overflow: > scroll;>Code goes here</pre> > > I don't know that much about HTML so "CSS" and "External Style Sheet" > are terms that I don't fully understand. > > Right now when I need a HTML contrainer at a new location in the same > or a different page, I am simply copying and pasting the string of > code shown above. > > There is probable some way that I could define one of these > containers and then add it to the menu. I would place my cursor in > the a the point I wanted to insert an empty container and click > Insert>HTML container. > Any ideas or suggestions as to how to go about doing that? Thanks. > > > > > > Ronx wrote: >> No - A form field area can only be pre-populated in Code view. >> You could try a scrollable HTML container instead, for example: >> >> <pre style="height: 300px; border: 1px solid red; width: 600px; >> overflow: scroll;"> >> Code goes here >> </pre> >> The CSS would be best placed in an external style sheet which can be >> accessed by multiple pages. >> The border is only for decoration. >> >> I use a similar method on my pages , for example: >> http://www.rxs-enterprises.org/fp/articles/2008/01/03/02/Validating_Email_Addresses.aspx >> >> "Greg Maxey" <gmaxey(a)mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in >> message news:#Rh7IUxtKHA.3408(a)TK2MSFTNGP06.phx.gbl... >>> Ronx, >>> >>> I suppose that I can make this work, but it seems combersome to work >>> with. Is is possible to insert the text area as you have shown but >>> then be able to paste in text while I am in designe mode? As it is, >>> I am putting in the text using the code view: >>> >>> >>> Ronx wrote: >>>> The text area can be made read-only: >>>> >>>> <textarea name="TextArea1" style="width: 600px; padding: 5px;" >>>> readonly="readonly" rows="10">code goes here</textarea> >>>> >>>> >>>> >>>> "Ronx" <ronx917(a)hotmail.com> wrote in message >>>> news:edsURSvtKHA.3360(a)TK2MSFTNGP06.phx.gbl... >>>>> Use a text-area - but why bother to lock it? >>>>> If the text area is not within a form changing the contents is >>>>> only going to affect the user - not your website. Users can >>>>> change the code after they paste it into their applications >>>>> anyway. When inserting the text area into the page remove the <form >>>>> ...> >>>>> and </form> tags that go with it to disable any chance of >>>>> submitting the field back to the website. >>>>> -- >>>>> Ron Symonds >>>>> Microsoft MVP (Expression Web) >>>>> http://www.rxs-enterprises.org/fp >>>>> >>>>> Reply only to group - emails will be deleted unread. >>>>> >>>>> >>>>> >>>>> "Greg Maxey" <gmaxey(a)mIKEvICTORpAPAsIERRA.oSCARrOMEOgOLF> wrote in >>>>> message news:uzMK5iutKHA.4568(a)TK2MSFTNGP05.phx.gbl... >>>>>> I am not sure if this is the correct forum or not. >>>>>> >>>>>> I use FrontPage to manage my personal website and I am one step >>>>>> above a novice. On several of my pages I post rather lengthy >>>>>> clips of VBA code. I would like to display this code in some >>>>>> sort of fixed sized text field where visitors could scroll to >>>>>> read or select and copy the text. I have found on the Insert menu a >>>>>> Form>Insert Text Area control that >>>>>> almost suit the bill if I could only figure out how "lock" it so >>>>>> that the content cannot be altered by visitors. Can this be done >>>>>> or is there a more appropriate type of control to use for my >>>>>> purpose. Thank you. >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Greg Maxey >>>>>> >>>>>> See my web site http://gregmaxey.mvps.org >>>>>> for an eclectic collection of Word Tips. >>>>>> >>>>>> Arrogance is a weed that grows mostly on a dunghill (Arabic >>>>>> proverb)
First
|
Prev
|
Pages: 1 2 3 Prev: Firefox in Code LooK Here First Next: updating frontpage website with new software |