Announcement

Collapse
No announcement yet.

HTML help?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HTML help?

    Hi there,
    I'm not too clued up on html coding and wonder if someone could help me out here?
    I currently have the following html in my product descriptions to bring up an explanation of the different grades of product.
    The html I use is:

    !!<<a href="grades.htm" target="newwindow" onClick="window.open
    ('','newwindow',config='height=500,width=480,scrollbars=yes,
    screenX=50,screenY=50,top=50,left=50'); return true"><font color="red">*A GRADE*</b><font size ="-2"> What's this?</a></font></font>>!!

    This shows as "*A GRADE* What's this?" and a link to a page, that opens in a new window, which I have uploaded as an html page.

    I'd really like it to be a pop-up window though, rather than a new browser window.
    Is that easy? For an html-know-nothing, I mean?
    How do I do it?
    Thanking you in advance!!
    Tracey
    Tracey

    #2
    <script language="">

    function openpopup(){
    var popurl="yourpagetoopen.htm"
    winpops=window.open(popurl,"","width=400,height=450,")
    }

    </script>
    <a href="javascriptpenpopup()">Your Link Text</a>
    Owner of a broken heart

    Comment


      #3
      Actinic has a popup JavaScript routine already available. This is defined in actiniccore.js as ShowPopUp(sUrl, nWidth, nHeight) so all you need to do is:-

      !!<<a href="javascript:ShowPopUp('grades.htm',500,480);"><font color="red"><b>*A GRADE*</b><font size ="-2"> What's this?</a></font></font>>!!

      Norman

      p.s. you had an unmatched </b> in there I think. I added the corresponding <b>
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        thanks, and another html basic Q

        Thanks to you both.
        Yeh, am not too good on the html..
        I did actually have the <b> in there but it was in a previos bit of html that I didn't cut (LOL) and I'd added the starting !!< to the post, if you see what I mean!
        Will try that though, thanks!
        If I have a previous lot of text in bold, do I have to <b> </b> immediately round it? Is it "bad" html to use the same <b> further on in the html?
        Cheers
        Tracey
        Tracey

        Comment


          #5
          If I have a previous lot of text in bold, do I have to <b> </b> immediately round it? Is it "bad" html to use the same <b> further on in the html?
          A <b> only lasts until a </b> turns up. So if you want plain text then some bold text, then some plain then more bold you have to do it like this:-

          plain text then <b>some bold text</b>, then some plain then <b>more bold</b>

          Also it's best to nest tags in a sensible order. E.g.

          <font color=red><b>bold red text</font></b> will probably work but.

          <font color=red><b>bold red text</b></font> is technically better (and is much easier to understand and modify).

          Norman
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            hmmm...thanks...
            what I meant though was this..
            I had...

            !!<<b>Buy or Hire this Pram<br>
            <a href="javascript:ShowPopUp('grades.htm',640,500);"><font color="red">*A GRADE*</b><font size ="-2"> What's this?</a></font></font>>!!

            So I'd kind of carried over the <b> from the first text (buy or hire this pram) to the second lot (*A GRADE*) rather than doing this

            !!<<b>Buy or Hire this Pram</b><br>
            <a href="javascript:ShowPopUp('grades.htm',640,500);"><font color="red"><b>*A GRADE*</b><font size ="-2"> What's this?</a></font></font>>!!

            Is the former ok or is the latter more proper html?
            I just wondered really.
            It worked how I had it first time but I can understand that it's probably better html to do it with 2 lots of <b> </b>

            Thanks for your continued assistance, Norman
            Regards
            Tracey (who is learning heaps today!)
            Tracey

            Comment


              #7
              The latter is best (but I think you've already worked that out). As I said it's best not to nest tags wrongly. It's also a lot more readable the second way. Also if you want to alter things you don't have to look back or forwards too far to find the matching tag.

              For example it your first example deleting everything between the <font color="red"> and </font> tags would also remove that </b> that was started right at the top and everything after would accidentally turn to bold.

              In the second example deleting everything between the <font color="red"> and </font> tags would have no side effects.

              Norman

              p.s. Of course we should all be doing this with Style Sheets but that's another story....
              Norman - www.drillpine.biz
              Edinburgh, U K / Bitez, Turkey

              Comment


                #8
                Thanks, Norman (again)
                I thought so and you're right, of course.
                I have made alterations to the html before and found myself with a dodgy outcome when I've previewed it.
                Usually down to the exact scenario you described!
                Can't comment on the Style Sheets, I've no idea what they are
                Thanks again though
                Will try to use "proper" html from now on!!
                Tracey
                Tracey

                Comment

                Working...
                X