Show/hide elements in DW CS3

I've just posted this question and got a reply from John
Waller, thanks John, but what I mean is that I don't want to use
layers, this has to do with the positioning in a table. I want to
add images to a table which is in a layer so I can put margin-left
and margin-right for the layer to "auto" so the whole table
(including images) will always be centered. If I add layers to the
table and add images to the layers (to get the mouse-over effect)
the layers will not move with the table to the center of the page,
I hope you guys know what I mean.
Anybody knows if it would be possible in DW CS3 to do so, see
the original question underneath to get the picuture:
Thanks again.
Hi
In DW8 I often used the possibility to put several layers on
top of eachother with images in them, this way I could show/hide
layers so the images would be visible when having a mouse-over
action on a thumbnail for example.
Now DW-CS3 gives the option show/hide elements, however, I
can not simply put elements on top of eachother, which is what I
want.
Am I stuck on using DW8 and the show/hide layers option, or
is there a way to put multiple images (elements) on top of
eachother in DW-CS3?
Thanks, have a nice day
Ferrohead

> table which is in a layer so
> I can put margin-left and margin-right for the layer to
"auto" so the
> whole
> table (including images) will always be centered.
You don't need to use a 'layer' for that, and I assume that
you mean a <div>
not a layer, since the latter implies absolute positioning.
> If I add layers to the table
I sure hope you are referring to just div tags and not
layers, because you
would never want to put an absolutely positioned element
directly into a
table cell.
> I hope you guys know what I mean.
Yes, I'm afraid I do. This whole scheme is just wrong.
It would be much better to use the SetText behavior to simply
dynamically
write the desired image link into a named container on the
page, much like
you can see being done here -
http://dreamweaverresources.com/tutorials/settextoflayer.htm
and a tutorial
http://www.dreamweaverresources.com/tutorials/settextoflayer.htm
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
==================
"Ferrohead" <[email protected]> wrote in
message
news:[email protected]...
> I've just posted this question and got a reply from John
Waller, thanks
> John,
> but what I mean is that I don't want to use layers, this
has to do with
> the
> positioning in a table. I want to add images to a table
which is in a
> layer so
> I can put margin-left and margin-right for the layer to
"auto" so the
> whole
> table (including images) will always be centered. If I
add layers to the
> table
> and add images to the layers (to get the mouse-over
effect) the layers
> will not
> move with the table to the center of the page, I hope
you guys know what I
> mean.
>
> Anybody knows if it would be possible in DW CS3 to do
so, see the original
> question underneath to get the picuture:
>
> Thanks again.
>
> Hi
> In DW8 I often used the possibility to put several
layers on top of
> eachother
> with images in them, this way I could show/hide layers
so the images would
> be
> visible when having a mouse-over action on a thumbnail
for example.
> Now DW-CS3 gives the option show/hide elements, however,
I can not simply
> put
> elements on top of eachother, which is what I want.
> Am I stuck on using DW8 and the show/hide layers option,
or is there a way
> to
> put multiple images (elements) on top of eachother in
DW-CS3?
>
> Thanks, have a nice day
>
> Ferrohead
>
>

Similar Messages

  • Show/hide elements

    Hi
    In DW8 I often used the possibility to put several layers on
    top of eachother with images in them, this way I could show/hide
    layers so the images would be visible when having a mouse-over
    action on a thumbnail for example.
    Now DW-CS3 gives the option show/hide elements, however, I
    can not simply put elements on top of eachother, which is what I
    want.
    Am I stuck on using DW8 and the show/hide layers option, or
    is there a way to put multiple images (elements) on top of
    eachother in DW-CS3?
    Thanks, have a nice day
    Ferrohead

    The functionality is identical in CS3, just the terms have
    changed.
    Layers (8) = AP Divs (CS3)
    Show/Hide Layers (8) = Show/Hide Elements (CS3)
    Go to the AP Elements panel (F2 or Window > AP Elements)
    and ensure that 1)
    all AP Elements are stacked on top of each other (ie there
    are no child
    elements which are shown by the name being indented in the
    list); 2) each
    Element has a unique Z index (if not re-number them manually
    so they're
    unique).
    Then apply the Show-Hide Elements behavior to each AP
    Element.
    Regards
    John Waller

  • Help with Show/Hide Elements please!

    I'm using the show/hide elements behavior for the first time and I'm not sure if it's working right. Am I supposed to be able to preview this feature, either in a browser or in Live View? It's not working in either, but I didn't know if the site had to actually be live for it to work or not.
    Also, my div is set to display:none; and I didn't know if that is correct, or if I should set a Z-index on all of them.
    Thank you!

    Am I supposed to be able to preview this feature, either in a browser or in Live View?
    Yes - it should work in both.
    Also, my div is set to display:none; and I didn't know if that is correct, or if I should set a Z-index on all of them.
    That could be the problem - show/hide toggles the visibility attribute between 'visible' and 'hidden'.  If the element is styled with display:none, even when it's visible it won't be displayed.  So, get rid of the display style, and just use the visibility one.  The default z-index is "1", so depending on your layout and the desired interaction with these elements, you may need to adjust your z-index as well.

  • Show-Hide element in Dreamweaver CS5

    Please can you tell me why when I validate a web page I get the following error when using the Show-Hide behaviour.  The error is only reported for the first use of the feature and no of the others.  I don't understand.
    Line 239,         Column 235:     there is no attribute "onload"…HideLayers('drive','','hide')" onload="MM_showHideLayers('drive','','hide')" /…

    You have used the attribute named above in your document, but the       document type you are using does not support that attribute for this       element. This error is often caused by incorrect use of the "Strict"       document type with a document that uses frames (e.g. you must use       the "Transitional" document type to get the "target" attribute), or       by using vendor proprietary extensions such as "marginheight" (this       is usually fixed by using CSS to achieve the desired effect instead).
    This error may also result if the element itself is not supported in       the document type you are using, as an undefined element will have no       supported attributes; in this case, see the element-undefined error       message for further information.
    How to fix: check the spelling and case of the element and attribute,        (Remember XHTML is all lower-case) and/or        check that they are both allowed in the chosen document type, and/or       use CSS instead of this attribute. If you received this error when using the        <embed> element to incorporate flash media in a Web page, see the        FAQ item on valid flash.
    Below is a copy of the relevant code -The code in bold is the line causing the error.  You will notice I have used it more than once, but I didn't get any other error messages.  Please help.
      <h3>Artist Drive and Palette</h3>
        <!--  this enlarges two images using show/hide and two different sized images -->
       <div id="drive"><img src="Images/Artist Drive large.jpg" alt="Artist Drive" width="300" height="195" title="Artist Drive" onmouseover="MM_showHideLayers('drive','','show')" onmouseout="MM_showHideLayers('drive','','hide')" onload="MM_showHideLayers('drive','','hide')" />
        </div>
        <img src="Images/Artist Drive.jpg" alt="Artist Drive" width="100" height="56"  class="fltlft" title="Artist Drive" onmouseover="MM_showHideLayers('drive','','show')" onmouseout="MM_showHideLayers('drive','','hide')" onload="MM_showHideLayers('drive','','hide')" />
        <div id="palette"><img src="Images/Artist Palette large.jpg" alt="Artist's palette" width="300" height="194" title="Artist's Palette" onmouseover="MM_showHideLayers('palette','','show')" onmouseout="MM_showHideLayers('palette','','hide')" onload="MM_showHideLayers('palette','','hide')" />
        </div>
        <img src="Images/Artist Palette.jpg" alt="Artist Palette" width="100" height="60" class="fltrt" title="Artist's Palette" onmouseover="MM_showHideLayers('palette','','show')" onmouseout="MM_showHideLayers('palette','','hide')" onload="MM_showHideLayers('palette','','hide')" />
        <p class="size">These formations are in Death Vally, California, USA. Artist's  Drive rises up to the top of an alluvial fan fed by a deep canyon cut into the  Black Mountains. Artist's Palette is on the face of the Black Mountains and is noted for having various colours of rock. These colours are caused by the  oxidation of different metals (red, pink and yellow is from iron salts, green is from decomposing tuff-derived mica, and manganese produces the purple). Called the Artist Drive Formation, the rock unit provides evidence for one of the Death Valley area's most violently explosive volcanic periods. The Miocene-aged formation is made up of cemented gravel, playa deposits, and much volcanic debris, perhaps 5,000 feet (1500 m) thick. Chemical weathering and hydrothermal alteration are also responsible for the variety of colours displayed in the Artist Drive Formation and nearby exposures of the Furnace Creek Formation.
        </p>
        <h3>Badlands</h3>
         <!--  this enlarges two images using show/hide and two different sized images -->
        <div id="badland"><img src="Images/The Badlands large.jpg" alt="The Badlands" width="300" height="183" onmouseover="MM_showHideLayers('badland','','show')" onmouseout="MM_showHideLayers('badland','','hide')" onload="MM_showHideLayers('badland','','hide')" />
        </div>
        <p><img src="Images/The Badlands.jpg" alt="The Badlands" width="100" height="61" class="fltlft" onmouseover="MM_showHideLayers('badland','','show')" onmouseout="MM_showHideLayers('badland','','hide')" onload="MM_showHideLayers('badland','','hide')" />
        </p>
        <div id="badland1"><img src="Images/The Badlands1 large.jpg" alt="The Badlands" width="300" height="132" onmouseover="MM_showHideLayers('badland1','','show')" onmouseout="MM_showHideLayers('badland1','','hide')" onload="MM_showHideLayers('badland1','','hide')" />
        </div>
        <img src="Images/The Badlands1.jpg" alt="The Badlands" width="100" height="44" class="fltrt" onmouseover="MM_showHideLayers('badland1','','show')" onmouseout="MM_showHideLayers('badland1','','hide')" onload="MM_showHideLayers('badland1','','hide')" />
        <p class="size">Badlands National Park, in southwest South Dakota preserves 242,756 acres (98,240 ha) of sharply eroded buttes, pinnacles, and spires blended with the largest protected mixed grass prairie in the United States. On-going rains, freezes and thaws have revealed millions of years of sediment that paint a colourful landscape on the prairies of south-western South Dakota. It contains the world's richest Oligocene  epoch fossil beds, dating 23 to 35 million years old.
        </p>

    Sometimes DW's javascripts will throw errors like that, most of the time it can be ignored.
    What doctype are you using (the first line of your html)?
    If you have a "Strict" Doctype, did you try changing it to a "Transitional" version as the error report suggested?
    Edit > Preferences > New Document > Default Document Type (DTD) > Change from Strict to Transitional of the same version.

  • Show / Hide Elements - how to make hidden elements non-interactive

    Hi,
    Is there a way to make hidden obejcts (through 'Show / Hide') not only hidden but completely non-interactive? I.e. even if an image is hidden, it is still click-able, which will release its set commandos (such as 'Swap Image' or 'Set Text of Container').

    Thanks a bunch! I haven't started out with the code yet. Just made some sketches to see what I need to research etc.
    When I get around to it, I'll get back to you!
    /Orvar

  • Show/hide element

    On this test page,
    http://www.talkitup4free.com/test,
    when you click the register link, i use a div for the pop up. but i
    want it to pop up in more than just a specified pixels placement.
    when you click on it, i want it to automatically center on the
    page.

    <p
    onclick="MM_showHideLayers('register','','show')">Click here to
    register.</p>
    That's not going to work - you cannot reliably attach events
    to anything
    other than anchor tags. Change that to this -
    <p><a href="#"
    onclick="MM_showHideLayers('register','','show');return
    false">Click here to register.</p>
    (of course, either way means that your register option won't
    work at all for
    someone with js disabled)
    Also, you have placed an absolutely positioned element
    directly into a table
    cell - that's a bad thing to do from the get-go, as has been
    posted here
    many times. Change your markup to this -
    <table width="50%" border="0" cellspacing="0">
    <tr>
    <td><p>Website</p>
    <p> </p>
    <p><a href="#"
    onclick="MM_showHideLayers('register','','show');return
    false">Click here to register.</p>
    <p>Text</p>
    <p> </p>
    <p>More text...</p></td>
    </tr>
    </table>
    <div id="register">
    <p>Register Page Goes Here</p>
    <p> </p>
    <p>Name:
    <label>
    <input type="text" name="name" id="name" />
    </label>
    </p>
    <p>E-mail:
    <label>
    <input type="text" name="email" id="email" />
    </label>
    </p>
    </div>
    Which will bring your AP div OUT OF THE TABLE.
    You will need a <form> tag for the form input elements
    to function at all.
    So don't forget that.
    Finally, you can position the AP div with left="40%" to give
    you a centering
    effect, or with no position values at all, and auto
    left/right margins,
    e.g.,
    #register {
    position:absolute;
    width:200px;
    height:115px;
    z-index:1;
    margin:0 auto;
    visibility: hidden;
    But whether this works as desired would depend on how you
    build the rest of
    the page.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "future-architect" <[email protected]> wrote
    in message
    news:[email protected]...
    > On this test page,
    http://www.talkitup4free.com/test,
    when you click the
    > register link, i use a div for the pop up. but i want it
    to pop up in more
    > than
    > just a specified pixels placement. when you click on it,
    i want it to
    > automatically center on the page.
    >

  • Show/Hide Element Dreamweaver

    I have the numbers "1 2 3" set up on a page to change a image and text when you click on each number. It works fine but I am not able to figure out how i can get the numbers to stay a specific color to indicate that this is the image you are viewing, a kind of "you are here" state.
    Any ideas?
    http://www.dinahsite.dananealdesigns.com/index3.html
    Many thanks,
    Houston

    You will not be able to do this easily since you have so many functions wired into those numbers.  The notion would be that you would have to also swap a class assignment on each number's span when one of the numbers is clicked to persist that particular number in a 'clicked' state, and to reset the other numbers to the unclicked state.  But not only would I not do things the way you have on this page, I also would not want to add that markup to this already busy element.
    By the way, you might want to check your validation - you have reused an ID value on the page.

  • "Show Hide Elements" movie Clips continue to play

    I've put a bunch of AP Div tags on a page with video links,
    once one begins to play it continues after another thumnail is
    clicked. So, a user can soon be bombarded with audio from 8
    different clips playing all at once, because once one begins
    playing, it seems to not "hide" or cease to play as it should.
    The URL in question is found here, but you have to click the
    link for more demo reel stuff to load the page I'm trying to work
    on:
    http://www.knappmediaproductions.com/portfolio.htm
    Remember, click where on the page it says: "More varied
    examples of Demo work seen here" to open the page I'm dealing with.
    Is there code of some kind to shut all those clips down when
    the layer they are on is hiding?

    I understand that you can remove one parent instead of many
    children in this way, which is good from an efficiency standpoint.
    Beyond that, I was ideally looking for a way to basically "freeze"
    the action on Frame A and return to it. I assume that, even with a
    parent-child scenario, I would still need to loop through all of
    the children and save their states (because just checking the
    parent attributes isn't going to get at this information). I was
    just asking if there was any easier way. It would be nice to be
    able to go to another frame - maybe on another level - and then
    come back to Frame A and pick up where I left off - just hopeful
    thinking, I guess.

  • Show Hide Element Problem

    i am are trying to do something that can be achieved with
    Javascript.
    <script language="javascript">
    function showHideComment(onOff){
    if (onOff == 1){
    document.getElementById('commentArea').style.display = "";
    } else {
    document.getElementById('commentArea').style.display =
    "none";
    </script>
    <input type="radio" name="comment1" value="1"
    onClick="showHideComment(this.value);"> On <br/>
    <input type="radio" name="comment1" value="0"
    onClick="showHideComment(this.value);"> Off
    <cfoutput query="showcomment">
    <table width="100%" border="0" align="center"
    id="commentArea">
    <tr>
    <td>Subject:</td>
    <td><b
    class="sidebar">#subject#</b></td>
    </tr>
    </table>
    </cfoutput>
    but problem lies here when it:
    hides only one Section of Comments, What about if i had more
    than 10 comments.
    i tried changes the variables but no luck
    plz help

    Hi,
    Just put your <cfoutput query> statement below the
    <table> tag (that is before the start of <tr> tag and
    it will do that..
    <cfquery name="showcomment" datasource="dav">
    select * from ttest;
    </cfquery>
    <script language="javascript">
    function showHideComment(onOff){
    if (onOff == 1){
    document.getElementById('commentArea').style.display = "";
    } else {
    document.getElementById('commentArea').style.display =
    "none";
    </script>
    <input type="radio" name="comment1" value="1"
    onClick="showHideComment(this.value);"> On <br/>
    <input type="radio" name="comment1" value="0"
    onClick="showHideComment(this.value);"> Off
    <table width="100%" border="0" align="center"
    id="commentArea">
    <cfoutput query="showcomment">
    <tr>
    <td>Subject:</td>
    <td><b
    class="sidebar">#firstname#</b></td>
    </tr>
    </cfoutput>
    </table>

  • Show/hide layers no mouseover option

    I have MX (2004) and am trying to create a simple show/hide
    layer behavior on some thumbnails/main images and it is just not
    working for me. The behavior has the show/hide option, but it does
    not show the arrows active to choose the mouseover and other
    events. I have the 'show 4.0 browsers and later' box
    checked...anyone know what else it could be? Is there a simple code
    I can drop in (I'm an artist, not a programmer, so be gentle)? Any
    immediate help at [email protected] would be very much
    appreciated!
    null

    maggotsquibb wrote:
    > I apologise if I am being really thick, but I need some
    help!
    >
    > I have just purchased a copy of Dreamweaver CS3 to
    discover that I can no
    > longer work with layers as I used to on MX. I frequently
    used the show-hide
    > layers behaviour so that I can click on an image in one
    frame to reveal a layer
    > in another frame, however, if I select the image and and
    then try to add the
    > behaviour, the show hide elements is grey out so that I
    cannot even select it
    > as an otion.
    Do you actually have any layers on the page. You need to put
    a layer on
    the page first and then apply the show-hide layer behaviour.

  • Custom web part with ontextual tab - show/hide on focus

    Hi,
    I built a webpart that has a contextual ribbon tab and buttons, this webpart is added to a wiki page. When the wiki page is in edit mode I would like this custom ribbon tab to be shown or hidden depending on whether my webpart is clicked.
    Great thanks, if you can show me the right direction.

    Hi,    
    To show/hide the ribbon tab depending on the click event of the web part, a workaround is that we can use JavaScript to achieve it.
    With JavaScript, we can capture the click event of one web part in a page and show/hide with the help of the corresponding JavaScript function.
    Here are some links will provide more information:
    onclick Event
    Toggle (Show/Hide) Element
    Feel free to reply if there are still any questions.
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to Show/hide the UI Elements in a WD Application

    Hi,
    I need to show/hide and control other properties such as required, readonly etc from UI.
    Can somebody please tell me how I can do that as I am able to save and retrieve the fields from another UI, now the need is to apply them once the Application starts.
    Thanks,
    Rachit

    Hi,
    To show/hide UI elements follow below procedure.
    1) define a attribute(VISIBLE in this case) element in the context of type WDUI_VISIBILITY
    2) in the UI element properties(Visible) bind the above attribute with the element you want to make visible/Hide.
    3) call below method to hide the UI element
        wd_context->set_attribute(
         EXPORTING
           name = 'VISIBLE'
           value = cl_wd_uielement=>e_visible-none ).
    4)     wd_context->set_attribute(
         EXPORTING
           name = 'VISIBLE'
           value = cl_wd_uielement=>e_visible-visible ).  for display.
    You have to call these method at the right spot.
    Thanks,
    Sree.
    Edited by: t sree on Oct 16, 2008 3:36 AM

  • Using an array to show/hide multiple elements?

    I have two elements that need to be hidden:
    "mov-imp"
    "mov-pim"
    Currently, I am doing this:
    var arr = ["mov-imp", "mov-pim"];
    // This is the onclick function
    sym.$.each(arr, function(){
                        $(this).hide();
    What's the best way to show/hide multiple elements/symbols in AE?
    Thanks!

    Hi Ashish, here is how you can hide all symbols in an array on button click. I'm not sure what you're asking in your second post, if you can clarify that.
    Example:
    www.timjaramillo.com/code/edge/arrays_hide_objects
    Source:
    www.timjaramillo.com/code/edge/_source/arrays_hide_objects.zip
    Code on button.click event:
    // if this button stays at root, you can just call sym.hideObjects();
    // this is in case you nest your button inside other symbols
    sym.getComposition().getStage().hideObjects();
    Code on Stage.compositionReady:
    var arr = ["obj1", "obj2"];
    sym.hideObjects = function(){
              $.each(arr, function(index, value) {
                        sym.$(value).hide();

  • Dreamweaver CS3 & Show/Hide Layers Problem

    I'm trying to use Dreamweaver CS3 and the Show/Hide Layers
    behaviour to show or hide another layer on a click. However, when I
    go to the behaviours window and click on the plus to get the drop
    down list of behaviours to choose from, 'Show/Hide Layers' isn't
    there - can anybody help me?! I need this to get an assignment done
    due in really soon.
    Thanks

    It goes well beyond DW's Show/hide, however....
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "twocans" <[email protected]> wrote in message
    news:fna57u$51a$[email protected]..
    >
    http://www.projectseven.com/extensions/info/autoshowhide/index.htm
    >
    > its a great free extension and simple to use.
    >
    > regards
    >
    > k
    >
    >
    >
    >
    > "xxtotallycrazy" <[email protected]>
    wrote in message
    > news:fna51o$4so$[email protected]..
    >> What I mean by needing help is, does anybody know
    where the option for
    >> 'Show/Hide Layers' actually is? Please help!
    >
    >

  • How to show/hide div based on mysql value

    I have a dataset that has a column 'locked' that is a boolean that I want to use to remove a button on a form.  The idea being that it will be set to 1 after a period of time thus removing the buttun that links to an update form and preventing the data from being changed.  Currently, I have the field linked to a check box at the top of the table.  How do I use this to hide the button (or any other html element for that matter) when set to 1 and show the element when set to 0?  I understand I need to creat a php variable from the mysql boolean and then use a if/else loop to hide/display the html but I don't know how to impliment this?  Thanks for any help offered.
    Here's the code:
    <?php require_once('Connections/testmypms.php'); ?>
    <?php
    $currentPage = $_SERVER["PHP_SELF"];
    $maxRows_spec_rx = 10;
    $pageNum_spec_rx = 0;
    if (isset($_GET['pageNum_spec_rx'])) {
      $pageNum_spec_rx = $_GET['pageNum_spec_rx'];
    $startRow_spec_rx = $pageNum_spec_rx * $maxRows_spec_rx;
    $colname_spec_rx = "1";
    if (isset($_GET['pxID'])) {
      $colname_spec_rx = (get_magic_quotes_gpc()) ? $_GET['pxID'] : addslashes($_GET['pxID']);
    mysql_select_db($database_testmypms, $testmypms);
    $query_spec_rx = sprintf("SELECT spec_rx.spec_rx_id, spec_rx.FK_px_id, DATE_FORMAT(spec_rx.spec_rx_date, '%%d-%%m-%%Y') as formatted_rx_date, spec_rx.FK_user_id, spec_rx.spec_rx_rsph, spec_rx.spec_rx_rcyl, spec_rx.spec_rx_raxis, spec_rx.spec_rx_rhprism, spec_rx.spec_rx_rhprismbase, spec_rx.spec_rx_rvprism, spec_rx.spec_rx_rvprismbase, spec_rx.spec_rx_rnadd, spec_rx.spec_rx_rnhprism, spec_rx.spec_rx_rnhprismbase, spec_rx.spec_rx_rnvprism, spec_rx.spec_rx_rnvprismbase, spec_rx.spec_rx_rintadd, spec_rx.spec_rx_rinthprism, spec_rx.spec_rx_rinthprismbase, spec_rx.spec_rx_rintvprism, spec_rx.spec_rx_rintvprismbase, spec_rx.spec_rx_lsph, spec_rx.spec_rx_lcyl, spec_rx.spec_rx_laxis, spec_rx.spec_rx_lhprism, spec_rx.spec_rx_lhprismbase, spec_rx.spec_rx_lvprism, spec_rx.spec_rx_lvprismbase, spec_rx.spec_rx_lintadd, spec_rx.spec_rx_linthprism, spec_rx.spec_rx_linthprismbase, spec_rx.spec_rx_lintvprism, spec_rx.spec_rx_lintvprismbase, spec_rx.spec_rx_lnadd, spec_rx.spec_rx_lnhprism, spec_rx.spec_rx_lnhprismbase, spec_rx.spec_rx_lnvprism, spec_rx.spec_rx_lnvprismbase, spec_rx.locked, users.user_id, users.user_firstname, users.user_surname FROM spec_rx, users WHERE %s = spec_rx.FK_px_id AND spec_rx.FK_user_id = users.user_id ORDER BY spec_rx.spec_rx_date DESC, spec_rx.spec_rx_id DESC", $colname_spec_rx);
    $query_limit_spec_rx = sprintf("%s LIMIT %d, %d", $query_spec_rx, $startRow_spec_rx, $maxRows_spec_rx);
    $spec_rx = mysql_query($query_limit_spec_rx, $testmypms) or die(mysql_error());
    $row_spec_rx = mysql_fetch_assoc($spec_rx);
    if (isset($_GET['totalRows_spec_rx'])) {
      $totalRows_spec_rx = $_GET['totalRows_spec_rx'];
    } else {
      $all_spec_rx = mysql_query($query_spec_rx);
      $totalRows_spec_rx = mysql_num_rows($all_spec_rx);
    $totalPages_spec_rx = ceil($totalRows_spec_rx/$maxRows_spec_rx)-1;
    $colname_demographics = "1";
    if (isset($_GET['pxID'])) {
      $colname_demographics = (get_magic_quotes_gpc()) ? $_GET['pxID'] : addslashes($_GET['pxID']);
    mysql_select_db($database_testmypms, $testmypms);
    $query_demographics = sprintf("SELECT demographics.px_id, demographics.FK_title_id, demographics.firstname, demographics.surname, DATE_FORMAT(demographics.dob, '%%d-%%m-%%Y') as formatted_dob, title.title_id, title.title FROM demographics, title WHERE %s = demographics.px_id AND demographics.FK_title_id = title.title_id", $colname_demographics);
    $demographics = mysql_query($query_demographics, $testmypms) or die(mysql_error());
    $row_demographics = mysql_fetch_assoc($demographics);
    $totalRows_demographics = mysql_num_rows($demographics);
    $queryString_spec_rx = "";
    if (!empty($_SERVER['QUERY_STRING'])) {
      $params = explode("&", $_SERVER['QUERY_STRING']);
      $newParams = array();
      foreach ($params as $param) {
        if (stristr($param, "pageNum_spec_rx") == false &&
            stristr($param, "totalRows_spec_rx") == false) {
          array_push($newParams, $param);
      if (count($newParams) != 0) {
        $queryString_spec_rx = "&" . htmlentities(implode("&", $newParams));
    $queryString_spec_rx = sprintf("&totalRows_spec_rx=%d%s", $totalRows_spec_rx, $queryString_spec_rx);
    ?>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Spec Rx3</title>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_goToURL() { //v3.0
      var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
      for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
    //-->
    </script>
    </head>
    <body>
    <p>Spec Rx</p>
    <p><?php echo $row_demographics['px_id']; ?></p>
    <p><?php echo $row_demographics['title']; ?> <?php echo $row_demographics['firstname']; ?> <?php echo $row_demographics['surname']; ?> <?php echo $row_demographics['formatted_dob']; ?> </p>
    <p>
      <input name="Add_spec_rx" type="button" id="Add_spec_rx" onClick="MM_goToURL('parent','add_spec_rx.php');return document.MM_returnValue" value="New Rx">
    </p>
    <p> <a href="<?php printf("%s?pageNum_spec_rx=%d%s", $currentPage, max(0, $pageNum_spec_rx - 1), $queryString_spec_rx); ?>">Previous</a> <a href="<?php printf("%s?pageNum_spec_rx=%d%s", $currentPage, min($totalPages_spec_rx, $pageNum_spec_rx + 1), $queryString_spec_rx); ?>">Next</a></p>
    <?php do { ?>
    <table border="1" cellspacing="1" cellpadding="5">
      <tr>
        <td> </td>
        <td><?php echo $row_spec_rx['formatted_rx_date']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_id']; ?></td>
        <td>locked:
        <input <?php if (!(strcmp($row_spec_rx['locked'],1))) {echo "checked";} ?> name="locked" type="checkbox" id="locked" value="1"></td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
      <tr>
        <td> </td>
        <td>Sph</td>
        <td>Cyl</td>
        <td>Axis</td>
        <td>HPrism</td>
        <td>HPrismBase</td>
        <td>VPrism</td>
        <td>VPrismBase</td>
        <td>NrAdd</td>
        <td>NrHPrism </td>
        <td>NrHPrismBase</td>
        <td>NrVPrism</td>
        <td>NrVPrismBase</td>
        <td>IntAdd</td>
        <td>IntHPrism</td>
        <td>IntHPrismBase</td>
        <td>IntVPrism</td>
        <td>IntVPrismBase</td>
      </tr>
      <tr>
        <td>R</td>
        <td><?php echo ($row_spec_rx['spec_rx_rsph']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_rsph']) : null; ?></td>
        <td><?php echo ($row_spec_rx['spec_rx_rcyl']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_rcyl']) : null; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_raxis']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rnvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rinthprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rinthprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_rintvprismbase']; ?></td>
      </tr>
      <tr>
        <td>L</td>
        <td><?php echo ($row_spec_rx['spec_rx_lsph']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_lsph']) : null; ?></td>
        <td><?php echo ($row_spec_rx['spec_rx_lcyl']<>null) ? sprintf ("%+4.2f",$row_spec_rx['spec_rx_lcyl']) : null; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_laxis']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnhprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnhprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lnvprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintadd']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_linthprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_linthprismbase']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintvprism']; ?></td>
        <td><?php echo $row_spec_rx['spec_rx_lintvprismbase']; ?></td>
      </tr>
      <tr>
        <td> </td>
        <td>User ID <?php echo $row_spec_rx['user_id']; ?></td>
        <td><?php echo $row_spec_rx['user_firstname']; ?></td>
        <td><?php echo $row_spec_rx['user_surname']; ?></td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
        <td> </td>
      </tr>
    </table>
    <p> </p>
    <?php } while ($row_spec_rx = mysql_fetch_assoc($spec_rx)); ?>
    <p> </p>
    <p> </p>
    <p> </p>
    </body>
    </html>
    <?php
    mysql_free_result($spec_rx);
    mysql_free_result($demographics);
    ?>

    Thanks for your help, nearly worked but only returned results where the if statement was met ie where locked =0, so I used an additional statement to display something else when when locked=1
    <?php
    if($row_spec_rx['locked'] == 1) {
    echo "button html goes here";
    ?>
    <?php
    if($row_spec_rx['locked'] == 0) {
    echo "something else";
    ?>
    I am sure there must be a more elegant way of doing this!

Maybe you are looking for

  • MT940 EBS upload for Incoming payment

    HI, We are implementing the MT940 format EBS upload for incoming payments. For incoming payment (customer) not executing the F110. so by EBS upload following posting should be happen; Debit - Bank account Credit - customer subledger account The note

  • Photoshop CC will not allow me to save files

    Photoshop CC will not allow me to save any files.  It will bring up the "save as" window, but then it immediately disappears when trying to select a save location.  No error messages, it just disappears.  Any ideas?  Running it on a Mac OS X Maverick

  • How to fix iMovie 08 problems under 10.5.3

    iMovie problems under Mac OS X 10.5.3 linked to color system After updating to Mac OS X 10.5.3, users may have problems with launching iMovie. For most, iMovie refuses to opens, and the usual fix of removing the iMovie preferences, caches, and other

  • Extending functionality of a button in pagebuttonbar

    Hi, I'm trying to customize "Create Customer" page in R12. The page has "Apply" button in pagebuttonbar. Based on "Profile Class" value entered in the create page, I need to create some child records like customer relationships. For this, I think I n

  • Exporting for DVD requires extremely low volumes, is that normal?

    Hi, I have completed a project and when exporting to dvd I find I need to lower the master volume by 18 db for it to not cause tv speakers to pop, I try it out on several different tv's with the same result. When I mix my audio none of it exceeds 0 d