Avatar billede flax Nybegynder
24. juli 2002 - 15:19 Der er 16 kommentarer og
1 løsning

check tabel for poster = if tom then write "emty"

dav dav...

Nu girver jeg op...

Jeg har filen http://www.albertslundapotek.dk/omapoteket_ledige_jobs.asp

som der pt. ligger to test poster i... Når jeg sletter de 2 poster vil jeg gerne have at min fil skal skrive "Der er p.t. ingen ledige stillinger.."

Det skal jo sikkert gøres med en slags if sætning.. og noget

rs.MoveNext
Loop
Else

Response.Write Der er p.t. ingen ledige stillinger.."

MEN jeg kan p.t. ikke lave funktionen..nogen der kan hjælpe?
Avatar billede flax Nybegynder
24. juli 2002 - 15:21 #1
P.t. henter den oplysningerne via.

<%
  DO WHILE NOT rs7.EOF
    artid = rs7("id")
    overskrift = rs7("overskrift")
    tekst = left(rs7("tekst"),200)
    dato = rs7("dato")
    dato2 = rs7("dato2")
   
    %>
                </tr>
                <tr>
                  <td valign="middle" align="top" width="1" height="2"></td>
                  <td valign="middle" align="left" width="368" height="2"> <table width="405" border="0" bgcolor="#ffffff" height="14">
                      <tr bgcolor="#CCCCCC">
                        <td height="10" bgcolor="#FFFFFF"><a
    href="vis_job.asp?artid=<%=artid%>" target="_self"><b><%=overskrift%></b></a>
                        </td>
                      </tr>
                    </table></td>
                  <td valign="middle" align="left" width="31" height="2">&nbsp;</td>
                </tr>
                <tr>
                  <td valign="middle" align="top" width="1" height="14"></td>
                  <td valign="middle" align="left" width="368" height="14"> <table width="406" border="0">
                      <tr>
                       
                <td width="255" valign="top"><%=tekst%>...<a
    href="vis_job.asp?artid=<%=artid%>" target="_self"><img src="pil.gif" width="18" height="14" border="0"></a></td>
                       
                <td width="141">&nbsp;</td>
                      </tr>
                    </table></td>
                  <td valign="middle" align="left" width="31">&nbsp;</td>
                </tr>
                <tr>
                 
          <td valign="middle" align="top" width="1" height="18"></td>
                 
          <td valign="middle" align="left" width="368"><font face="Verdana" size="1">
            <br>
            </font></td>
                  <td valign="middle" align="left" width="31">&nbsp;</td>
                  <%
    rs7.MoveNext
  LOOP
  RS7.Close
 
    %>
                </tr>
              </table>
      </p>
      <table border="0" cellpadding="0" cellspacing="2" width="405">
        <%
  DO WHILE NOT rs11.EOF
    id = rs11("id")
    overskrift = rs11("overskrift")
    dato = rs11("dato")
    dato2 = rs11("dato2")
    Response.Write "<tr background='hvid.gif'>"
    Response.Write "<td>"
    %>
        <a href="vis_job.asp?artid=<%=id%>" target="_self"><img src="pil.gif" width="18" height="13" border="0"><b><%=overskrift%>
        - </b><font size="-2">(<%=dato%>)</font></a> <br>
        <br>
        <%                  


Response.Write "</td>"
Response.Write "</tr>"
rs11.MoveNext
  LOOP
  RS11.Close
  %>
Avatar billede tmceu Praktikant
24. juli 2002 - 15:23 #2
Hvis du pakker din loop ind i et If statement, bør det virke

If Not objRS.EOF Then
' loop
Else
Response.Write "Der er ingen ledige jobs"
End If
Avatar billede flax Nybegynder
24. juli 2002 - 15:26 #3
hvor henne? :-) helt oppe. helt nede.. ?
Avatar billede flax Nybegynder
24. juli 2002 - 15:27 #4
Hov! Glemte at sige at jeg bruger denne helt for oven i filen:

SQLstmt7 = "SELECT * FROM job ORDER BY dato2 ASC LIMIT 0, 12;"
SQLstmt11 = "SELECT * FROM job  ORDER BY dato2 ASC LIMIT 12, 40;"
'
'response.write SQLstmt


my_conn.Execute (SQLstmt7)
my_conn.Execute (SQLstmt11)


Set rs7 = my_conn.Execute(SQLstmt7)
Set rs11 = my_conn.Execute(SQLstmt11)
  %>
Avatar billede flax Nybegynder
24. juli 2002 - 15:27 #5
hvor "ORDER BY dato2 " evt. ikke behøves at være med.
Avatar billede tmceu Praktikant
24. juli 2002 - 15:29 #6
Den skal uden om det loop, der lister dine ledige jobs.

Altså noget i stil med dette:

' Åbn recordsettet

' Kontroller om recordsettet er tomt
If Not objRS.EOF Then
' Hvis det ikke er tomt, vis alle ledige jobs med dit eksisterende loop
Else
Response.Write "Der er ingen ledige jobs"
End If
Avatar billede flax Nybegynder
24. juli 2002 - 15:30 #7
argh.. Det ser rigtigt ud.. Hvis jeg poster hele filen, vil du sætte det ind det rigtige sted så? :-)
Avatar billede tmceu Praktikant
24. juli 2002 - 15:33 #8
Jeg kan da prøve. Dog kan jeg ikke forstå hvorfor du laver 2 udtræk fra job tabellen ?
Avatar billede flax Nybegynder
24. juli 2002 - 15:37 #9
fordi rs7 viser overskrift og de først 200 tegn af indhold tror jeg.. for de første 12 jobs.. og efterfølgende vises der kun overskriften (rs11)
Avatar billede flax Nybegynder
24. juli 2002 - 15:39 #10
<%response.expires=0%>

<%
    SQLserveradr="x"
    SQLdatabase="x"   
    SQLlogin="x"
    SQLpassword="x"
    Set my_conn = Server.CreateObject("ADODB.Connection")

    my_conn.Open "driver={MySql};server="& SQLserveradr &";database="& SQLdatabase &";uid="& SQLlogin &";pwd="& SQLpassword 


SQLstmt7 = "SELECT * FROM job ORDER BY dato2 ASC LIMIT 0, 12;"
SQLstmt11 = "SELECT * FROM job  ORDER BY dato2 ASC LIMIT 12, 40;"
'
'response.write SQLstmt


my_conn.Execute (SQLstmt7)
my_conn.Execute (SQLstmt11)


Set rs7 = my_conn.Execute(SQLstmt7)
Set rs11 = my_conn.Execute(SQLstmt11)
  %>
<html>
    <head>
        <style type="text/css">
<!--
  BODY {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-style: normal;
    color: black;
}
  A:LINK {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-style: normal;
    text-decoration : none;
    color: black;}
   
  A:VISITED {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-style: normal;
    text-decoration : none;
    color: black;
}
  A:HOVER {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-style: normal;
    text-decoration : underline;
    color: black;
}
  TD {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-weight: normal;
    font-style: normal;
    color: black;
}
-->
</style>
              <style type="text/css">
#divCont {position:relative; z-index:1; left:5px; top:70px; height:400px; width:140px; visibility:hidden;}
.clTop  {position:absolute; z-index:1; width:140px; line-height:17px;}
.clSub  {position:absolute; z-index:1; left:0px; top:20px; width:140px; line-height:14px;}

/*** This sets the style for the links inside the menu. ***/
#divCont .clTop a {color:#000000; font-family:verdana,arial,helvetica,sans-serif; font-size:12px; font-weight:bold; text-decoration:none;}
#divCont .clTop a:hover {color:#000000; text-decoration:none;}
#divCont .clTop .clSub a {color:#777777; font-family:verdana,arial,helvetica,sans-serif; font-size:12px; font-weight:normal; text-decoration:none;}
#divCont .clTop .clSub a:hover {color:#333333; text-decoration:none;} 
</style>
<script language="JavaScript" type="text/javascript">

function lib_bwcheck(){ //Browsercheck (needed)
    this.ver=navigator.appVersion
    this.agent=navigator.userAgent
    this.dom=document.getElementById?1:0
    this.opera5=this.agent.indexOf("Opera 5")>-1
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
    this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
    this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
    this.ie=this.ie4||this.ie5||this.ie6
    this.mac=this.agent.indexOf("Mac")>-1
    this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
    return this
}
var bw=new lib_bwcheck()



/*** variables you can configure ***/

FoldNumber = 3                    //How many toplinks do you have?
var stayFolded = false            //Stay open when you click a new toplink?
foldImg = 1                        //Do you want images (if not set to 0 and remove the images from the body)?
mainOffsetY = 0                    //Vertical space adjustment between the main items, in pixels.

//This is the default image.
//Remember to change the actual images in the page as well, but remember to keep the name of the image.
var unImg=new Image();
unImg.src='foldoutmenu_arrow.gif'

var exImg=new Image();                    //Making an image variable...
exImg.src='foldoutmenu_arrow_open.gif'    //...this is the source of the image that it changes to when the menu expands.

// NOTE: if you change the position of divCont from absolute to relative, you can put the foldoutmenu in a table.
// HOWEVER it will no longer work in netscape 4. If you wish to support netscape 4, you have to use absolute positioning.

/*** There should be no need to change anything beyond this. ***/

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

if(navigator.userAgent.indexOf('Opera')>-1 && document.getElementById){ //Opera 5 resize fix.
    scrX= innerWidth; scrY= innerHeight;
    document.onmousemove= function(){
        if(scrX<innerWidth-10 || scrY<innerHeight-10 || scrX>innerWidth+10 || scrY>innerHeight+10){
            scrX = innerWidth;
            scrY = innerHeight;
            initFoldout();
        }
    };
}

//object constructor...
function makeMenu(obj,nest){
    nest= (!nest)?"":'document.'+nest+'.';
    this.el= bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):document.getElementById(obj);   
      this.css= bw.ns4?this.el:this.el.style;
    this.ref= bw.ns4?this.el.document:document;       
    this.x= (bw.ns4||bw.opera5)?this.css.left:this.el.offsetLeft;
    this.y= (bw.ns4||bw.opera5)?this.css.top:this.el.offsetTop;
    this.h= (bw.ie||bw.ns6)?this.el.offsetHeight:bw.ns4?this.ref.height:bw.opera5?this.css.pixelHeight:0;
    this.vis= b_vis;
    this.hideIt= b_hideIt;
    this.showIt= b_showIt;
    this.moveIt= b_moveIt;
    return this
}
//object methods...
function b_showIt(){this.css.visibility='visible'}
function b_hideIt(){this.css.visibility='hidden'}
function b_vis(){if(this.css.visibility=='hidden' || this.css.visibility=='HIDDEN' || this.css.visibility=='hide') return true;}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x+px; this.css.top=this.y+px}

/************************************************************************************
This is the function that changes the sub menus to folded or unfolded state.
************************************************************************************/
function menu(num){
    if(bw.bw){
        if (!stayFolded){
            for (var i=0; i<oSub.length; i++){
                if (i!=num){
                    oSub[i].hideIt()
                    if (foldImg)oTop[i].ref["imgA"+i].src = unImg.src
                }
            }
            for(var i=1; i<oTop.length; i++){
                oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h)
            }
        }
        if (oSub[num].vis()){
            oSub[num].showIt()
            if (foldImg)oTop[num].ref["imgA"+num].src = exImg.src
        }else{
            oSub[num].hideIt()
            if(foldImg)oTop[num].ref["imgA"+num].src = unImg.src
        }
        for(var i=1; i<oTop.length; i++){
            if (!oSub[i-1].vis()) oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h+oSub[i-1].h+mainOffsetY)
            else oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h+mainOffsetY)
        }
    }
}

/*********************************************************************
The init function... there should be no need to change anything here.
*********************************************************************/
function initFoldout(){
    //Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
    bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
    if (bw.opera5) bw.ns6 = 0

    oTop = new Array()
    oSub = new Array()
    //Making the objects and hiding the subs...
    for (var i=0; i<FoldNumber; i++){
        oTop[i] = new makeMenu('divTop'+i,'divCont')
        oSub[i] = new makeMenu('divSub'+i,'divCont.document.divTop'+i)
        oSub[i].hideIt()
    }
   
    //Positioning the top objects...
    oTop[0].moveIt(0,0)
    for (var i=1; i<oTop.length; i++){
        oTop[i].moveIt(0, oTop[i-1].y+oTop[i-1].h+mainOffsetY)
    }
   
    //Making the containing menu object and showing it...
    oCont = new makeMenu('divCont')
    oCont.showIt()
}

// If the browser is ok, the script is started onload...
if(bw.bw) onload = initFoldout;
</script>
        <title>Velkommen til Albertslund Apotek..</title>
        <meta name="description" content="">
        <meta name="keywords" content="">
    </head>
    <body leftmargin="0" topmargin="0" marginheight="0">
<!--#include file="top.asp"-->
<!--#include file="top2.asp"-->
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="3" height="364" valign="top" bgcolor="#6699cc"><img src="b_07.gif" width="3" height="70"></td>
    <!--#include file="omapoteket_menu_inc.asp"-->
    <td width="7"></td>
    <td width="413" valign="top"> <p>&nbsp;</p>
      <table width="412" border="0" background="overskrift.gif">
        <tr>
          <td width="406" height="8"><strong><font color="#FFFFFF" size="1">Ledige
            stillinger p&aring; apoteket</font></strong></td>
        </tr>
      </table>
      <table width="412" border="0" background="overskrift2.gif">
        <tr>
          <td width="406" height="1"></td>
        </tr>
      </table>
      <strong><br>
      </strong>
      <table border="0" width="400" cellspacing="0" cellpadding="0" height="69">
        <tr>
                  <td valign="top" colspan="3" align="right" height="3"></td>
                </tr>
                <tr>
                  <%
  DO WHILE NOT rs7.EOF
    artid = rs7("id")
    overskrift = rs7("overskrift")
    tekst = left(rs7("tekst"),200)
    dato = rs7("dato")
    dato2 = rs7("dato2")
   
    %>
                </tr>
                <tr>
                  <td valign="middle" align="top" width="1" height="2"></td>
                  <td valign="middle" align="left" width="368" height="2"> <table width="405" border="0" bgcolor="#ffffff" height="14">
                      <tr bgcolor="#CCCCCC">
                        <td height="10" bgcolor="#FFFFFF"><a
    href="vis_job.asp?artid=<%=artid%>" target="_self"><b><%=overskrift%></b></a>
                        </td>
                      </tr>
                    </table></td>
                  <td valign="middle" align="left" width="31" height="2">&nbsp;</td>
                </tr>
                <tr>
                  <td valign="middle" align="top" width="1" height="14"></td>
                  <td valign="middle" align="left" width="368" height="14"> <table width="406" border="0">
                      <tr>
                       
                <td width="255" valign="top"><%=tekst%>...<a
    href="vis_job.asp?artid=<%=artid%>" target="_self"><img src="pil.gif" width="18" height="14" border="0"></a></td>
                       
                <td width="141">&nbsp;</td>
                      </tr>
                    </table></td>
                  <td valign="middle" align="left" width="31">&nbsp;</td>
                </tr>
                <tr>
                 
          <td valign="middle" align="top" width="1" height="18"></td>
                 
          <td valign="middle" align="left" width="368"><font face="Verdana" size="1">
            <br>
            </font></td>
                  <td valign="middle" align="left" width="31">&nbsp;</td>
                  <%
    rs7.MoveNext
  LOOP
  RS7.Close
 
    %>
                </tr>
              </table>
      </p>
      <table border="0" cellpadding="0" cellspacing="2" width="405">
        <%
  DO WHILE NOT rs11.EOF
    id = rs11("id")
    overskrift = rs11("overskrift")
    dato = rs11("dato")
    dato2 = rs11("dato2")
    Response.Write "<tr background='hvid.gif'>"
    Response.Write "<td>"
    %>
        <a href="vis_job.asp?artid=<%=id%>" target="_self"><img src="pil.gif" width="18" height="13" border="0"><b><%=overskrift%>
        - </b><font size="-2">(<%=dato%>)</font></a> <br>
        <br>
        <%                  


Response.Write "</td>"
Response.Write "</tr>"
rs11.MoveNext
  LOOP
  RS11.Close
  %>
        <tr>
          <td></td>
        </tr>
      </table>
      <p align="center"><br>
      </p>
      <table width="412" border="0" background="overskrift.gif">
        <tr>
          <td width="406" height="8"><strong><font color="#FFFFFF" size="1">S&oslash;g
            stilling uopfordret</font></strong></td>
        </tr>
      </table>
      <table width="412" border="0" background="overskrift2.gif">
        <tr>
          <td width="406" height="1"></td>
        </tr>
      </table>
      <p> Hvis der ikke er nogle ledige jobs som matcher dig, kan du v&aelig;lge
        at s&oslash;ge uopfordret, da vi altid leder efter dygtige medarbejdere.<br>
        <br>
        Alle uopfordrede ans&oslash;gninger behandles fortroligt og besvares skriftligt.<br>
        <br>
        Den uopfordrede ans&oslash;gning b&oslash;r indeholde job&oslash;nske,
        &aring;rsagen til at du s&oslash;ger et job hos Albertslund Apotek, samt
        et fyldigt CV med beskrivelse af uddannelse, tidligere arbejdsomr&aring;der
        etc.<br>
        <br>
        For at im&oslash;dekomme alle vore ans&oslash;gere gemmer apoteket din
        ans&oslash;gning i vores jobbank i op til 6 m&aring;neder. Efter 6 m&aring;neder
        kasseres din ans&oslash;gning, men du er selvf&oslash;lgelig herefter
        velkommen til at sende en ny.</p>
      <p>Alle uopfordrede ans&oslash;gninger sendes til:<br>
        <a href="mailto:apoteket@albertslundapotek.dk"><strong>apoteket@albertslundapotek.dk</strong></a><strong><br>
        </strong><br>
        Eller sendes pr. almindelig post til:<br>
        <strong>Att.:Vinnie Krogh <br>
        Albertslund Apotek<br>
        Bytorvet 5<br>
        2620 Albertslund Apotek</strong></p>
      <p align="center"><br>
        <br>
        <br>
        <br>
        <a href="#top"><img src="bund_navigation.jpg" width="398" height="29" border="0"></a>
      </p>
      </td>
    <td width="17" valign="top"> <div align="right"></div>
      <font face="Geneva,Verdana,Helvetica" size="2">&nbsp;</font> <div align="left">
        <p> </div></td>
    <td width="3" valign="top" bgcolor="#6699cc"><img src="b_07.gif" width="3" height="70"></td>
  </tr>
</table>
<div align="center">
  <!--#include file="bund.asp"-->
</div>
<%
my_conn.Close
Set SQLstmt7 = nothing
Set SQLstmt11 = nothing
%>
</body>
</html>
Avatar billede flax Nybegynder
24. juli 2002 - 15:40 #11
Jeg har lige fjernet SQL oplysnignerne.. :-)

SQLserveradr="x"
    SQLdatabase="x"   
    SQLlogin="x"
    SQLpassword="x"
Avatar billede tmceu Praktikant
24. juli 2002 - 15:49 #12
Det var en ordentlig omgang :-)

Jeg forstår stadig ikke hvad du vil med 2 recordsets, men jeg har smidt en If uden om begge, der blot skriver "der er ikke noget i rs7/rs11". Denne besked kan du selv erstatte med en mere sigende.

<%response.expires=0%>

<%
    SQLserveradr="x"
    SQLdatabase="x"   
    SQLlogin="x"
    SQLpassword="x"
    Set my_conn = Server.CreateObject("ADODB.Connection")

    my_conn.Open "driver={MySql};server="& SQLserveradr &";database="& SQLdatabase &";uid="& SQLlogin &";pwd="& SQLpassword 


SQLstmt7 = "SELECT * FROM job ORDER BY dato2 ASC LIMIT 0, 12;"
SQLstmt11 = "SELECT * FROM job  ORDER BY dato2 ASC LIMIT 12, 40;"
'
'response.write SQLstmt


my_conn.Execute (SQLstmt7)
my_conn.Execute (SQLstmt11)


Set rs7 = my_conn.Execute(SQLstmt7)
Set rs11 = my_conn.Execute(SQLstmt11)
  %>
<html>
    <head>
        <style type="text/css">
<!--
  BODY {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-style: normal;
    color: black;
}
  A:LINK {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-style: normal;
    text-decoration : none;
    color: black;}
   
  A:VISITED {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-style: normal;
    text-decoration : none;
    color: black;
}
  A:HOVER {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-style: normal;
    text-decoration : underline;
    color: black;
}
  TD {
    font-family: Geneva,Verdana,Arial;
    font-size: 8pt;
    font-weight: normal;
    font-style: normal;
    color: black;
}
-->
</style>
              <style type="text/css">
#divCont {position:relative; z-index:1; left:5px; top:70px; height:400px; width:140px; visibility:hidden;}
.clTop  {position:absolute; z-index:1; width:140px; line-height:17px;}
.clSub  {position:absolute; z-index:1; left:0px; top:20px; width:140px; line-height:14px;}

/*** This sets the style for the links inside the menu. ***/
#divCont .clTop a {color:#000000; font-family:verdana,arial,helvetica,sans-serif; font-size:12px; font-weight:bold; text-decoration:none;}
#divCont .clTop a:hover {color:#000000; text-decoration:none;}
#divCont .clTop .clSub a {color:#777777; font-family:verdana,arial,helvetica,sans-serif; font-size:12px; font-weight:normal; text-decoration:none;}
#divCont .clTop .clSub a:hover {color:#333333; text-decoration:none;} 
</style>
<script language="JavaScript" type="text/javascript">

function lib_bwcheck(){ //Browsercheck (needed)
    this.ver=navigator.appVersion
    this.agent=navigator.userAgent
    this.dom=document.getElementById?1:0
    this.opera5=this.agent.indexOf("Opera 5")>-1
    this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
    this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
    this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
    this.ie=this.ie4||this.ie5||this.ie6
    this.mac=this.agent.indexOf("Mac")>-1
    this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
    this.ns4=(document.layers && !this.dom)?1:0;
    this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
    return this
}
var bw=new lib_bwcheck()



/*** variables you can configure ***/

FoldNumber = 3                    //How many toplinks do you have?
var stayFolded = false            //Stay open when you click a new toplink?
foldImg = 1                        //Do you want images (if not set to 0 and remove the images from the body)?
mainOffsetY = 0                    //Vertical space adjustment between the main items, in pixels.

//This is the default image.
//Remember to change the actual images in the page as well, but remember to keep the name of the image.
var unImg=new Image();
unImg.src='foldoutmenu_arrow.gif'

var exImg=new Image();                    //Making an image variable...
exImg.src='foldoutmenu_arrow_open.gif'    //...this is the source of the image that it changes to when the menu expands.

// NOTE: if you change the position of divCont from absolute to relative, you can put the foldoutmenu in a table.
// HOWEVER it will no longer work in netscape 4. If you wish to support netscape 4, you have to use absolute positioning.

/*** There should be no need to change anything beyond this. ***/

// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";

if(navigator.userAgent.indexOf('Opera')>-1 && document.getElementById){ //Opera 5 resize fix.
    scrX= innerWidth; scrY= innerHeight;
    document.onmousemove= function(){
        if(scrX<innerWidth-10 || scrY<innerHeight-10 || scrX>innerWidth+10 || scrY>innerHeight+10){
            scrX = innerWidth;
            scrY = innerHeight;
            initFoldout();
        }
    };
}

//object constructor...
function makeMenu(obj,nest){
    nest= (!nest)?"":'document.'+nest+'.';
    this.el= bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):document.getElementById(obj);   
      this.css= bw.ns4?this.el:this.el.style;
    this.ref= bw.ns4?this.el.document:document;       
    this.x= (bw.ns4||bw.opera5)?this.css.left:this.el.offsetLeft;
    this.y= (bw.ns4||bw.opera5)?this.css.top:this.el.offsetTop;
    this.h= (bw.ie||bw.ns6)?this.el.offsetHeight:bw.ns4?this.ref.height:bw.opera5?this.css.pixelHeight:0;
    this.vis= b_vis;
    this.hideIt= b_hideIt;
    this.showIt= b_showIt;
    this.moveIt= b_moveIt;
    return this
}
//object methods...
function b_showIt(){this.css.visibility='visible'}
function b_hideIt(){this.css.visibility='hidden'}
function b_vis(){if(this.css.visibility=='hidden' || this.css.visibility=='HIDDEN' || this.css.visibility=='hide') return true;}
function b_moveIt(x,y){this.x=x; this.y=y; this.css.left=this.x+px; this.css.top=this.y+px}

/************************************************************************************
This is the function that changes the sub menus to folded or unfolded state.
************************************************************************************/
function menu(num){
    if(bw.bw){
        if (!stayFolded){
            for (var i=0; i<oSub.length; i++){
                if (i!=num){
                    oSub[i].hideIt()
                    if (foldImg)oTop[i].ref["imgA"+i].src = unImg.src
                }
            }
            for(var i=1; i<oTop.length; i++){
                oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h)
            }
        }
        if (oSub[num].vis()){
            oSub[num].showIt()
            if (foldImg)oTop[num].ref["imgA"+num].src = exImg.src
        }else{
            oSub[num].hideIt()
            if(foldImg)oTop[num].ref["imgA"+num].src = unImg.src
        }
        for(var i=1; i<oTop.length; i++){
            if (!oSub[i-1].vis()) oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h+oSub[i-1].h+mainOffsetY)
            else oTop[i].moveIt(0,oTop[i-1].y+oTop[i-1].h+mainOffsetY)
        }
    }
}

/*********************************************************************
The init function... there should be no need to change anything here.
*********************************************************************/
function initFoldout(){
    //Fixing the browsercheck for opera... this can be removed if the browsercheck has been updated!!
    bw.opera5 = (navigator.userAgent.indexOf("Opera")>-1 && document.getElementById)?true:false
    if (bw.opera5) bw.ns6 = 0

    oTop = new Array()
    oSub = new Array()
    //Making the objects and hiding the subs...
    for (var i=0; i<FoldNumber; i++){
        oTop[i] = new makeMenu('divTop'+i,'divCont')
        oSub[i] = new makeMenu('divSub'+i,'divCont.document.divTop'+i)
        oSub[i].hideIt()
    }
   
    //Positioning the top objects...
    oTop[0].moveIt(0,0)
    for (var i=1; i<oTop.length; i++){
        oTop[i].moveIt(0, oTop[i-1].y+oTop[i-1].h+mainOffsetY)
    }
   
    //Making the containing menu object and showing it...
    oCont = new makeMenu('divCont')
    oCont.showIt()
}

// If the browser is ok, the script is started onload...
if(bw.bw) onload = initFoldout;
</script>
        <title>Velkommen til Albertslund Apotek..</title>
        <meta name="description" content="">
        <meta name="keywords" content="">
    </head>
    <body leftmargin="0" topmargin="0" marginheight="0">
<!--#include file="top.asp"-->
<!--#include file="top2.asp"-->
<table width="600" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="3" height="364" valign="top" bgcolor="#6699cc"><img src="b_07.gif" width="3" height="70"></td>
    <!--#include file="omapoteket_menu_inc.asp"-->
    <td width="7"></td>
    <td width="413" valign="top"> <p>&nbsp;</p>
      <table width="412" border="0" background="overskrift.gif">
        <tr>
          <td width="406" height="8"><strong><font color="#FFFFFF" size="1">Ledige
            stillinger p&aring; apoteket</font></strong></td>
        </tr>
      </table>
      <table width="412" border="0" background="overskrift2.gif">
        <tr>
          <td width="406" height="1"></td>
        </tr>
      </table>
      <strong><br>
      </strong>
      <table border="0" width="400" cellspacing="0" cellpadding="0" height="69">
        <tr>
                  <td valign="top" colspan="3" align="right" height="3"></td>
                </tr>
                <tr>
                  <%

If Not rs7.EOF Then

  DO WHILE NOT rs7.EOF
    artid = rs7("id")
    overskrift = rs7("overskrift")
    tekst = left(rs7("tekst"),200)
    dato = rs7("dato")
    dato2 = rs7("dato2")
   
    %>
                </tr>
                <tr>
                  <td valign="middle" align="top" width="1" height="2"></td>
                  <td valign="middle" align="left" width="368" height="2"> <table width="405" border="0" bgcolor="#ffffff" height="14">
                      <tr bgcolor="#CCCCCC">
                        <td height="10" bgcolor="#FFFFFF"><a
    href="vis_job.asp?artid=<%=artid%>" target="_self"><b><%=overskrift%></b></a>
                        </td>
                      </tr>
                    </table></td>
                  <td valign="middle" align="left" width="31" height="2">&nbsp;</td>
                </tr>
                <tr>
                  <td valign="middle" align="top" width="1" height="14"></td>
                  <td valign="middle" align="left" width="368" height="14"> <table width="406" border="0">
                      <tr>
                       
                <td width="255" valign="top"><%=tekst%>...<a
    href="vis_job.asp?artid=<%=artid%>" target="_self"><img src="pil.gif" width="18" height="14" border="0"></a></td>
                       
                <td width="141">&nbsp;</td>
                      </tr>
                    </table></td>
                  <td valign="middle" align="left" width="31">&nbsp;</td>
                </tr>
                <tr>
                 
          <td valign="middle" align="top" width="1" height="18"></td>
                 
          <td valign="middle" align="left" width="368"><font face="Verdana" size="1">
            <br>
            </font></td>
                  <td valign="middle" align="left" width="31">&nbsp;</td>
                  <%
    rs7.MoveNext
  LOOP

Else
Response.Write "Der er ikke noget i rs7"
End If


  RS7.Close
 
    %>
                </tr>
              </table>
      </p>
      <table border="0" cellpadding="0" cellspacing="2" width="405">
        <%

If Not rs11.EOF Then

  DO WHILE NOT rs11.EOF
    id = rs11("id")
    overskrift = rs11("overskrift")
    dato = rs11("dato")
    dato2 = rs11("dato2")
    Response.Write "<tr background='hvid.gif'>"
    Response.Write "<td>"
    %>
        <a href="vis_job.asp?artid=<%=id%>" target="_self"><img src="pil.gif" width="18" height="13" border="0"><b><%=overskrift%>
        - </b><font size="-2">(<%=dato%>)</font></a> <br>
        <br>
        <%                 


Response.Write "</td>"
Response.Write "</tr>"
rs11.MoveNext
  LOOP

Else
Response.Write "Der er ikke noget i rs11"
End If

  RS11.Close
  %>
        <tr>
          <td></td>
        </tr>
      </table>
      <p align="center"><br>
      </p>
      <table width="412" border="0" background="overskrift.gif">
        <tr>
          <td width="406" height="8"><strong><font color="#FFFFFF" size="1">S&oslash;g
            stilling uopfordret</font></strong></td>
        </tr>
      </table>
      <table width="412" border="0" background="overskrift2.gif">
        <tr>
          <td width="406" height="1"></td>
        </tr>
      </table>
      <p> Hvis der ikke er nogle ledige jobs som matcher dig, kan du v&aelig;lge
        at s&oslash;ge uopfordret, da vi altid leder efter dygtige medarbejdere.<br>
        <br>
        Alle uopfordrede ans&oslash;gninger behandles fortroligt og besvares skriftligt.<br>
        <br>
        Den uopfordrede ans&oslash;gning b&oslash;r indeholde job&oslash;nske,
        &aring;rsagen til at du s&oslash;ger et job hos Albertslund Apotek, samt
        et fyldigt CV med beskrivelse af uddannelse, tidligere arbejdsomr&aring;der
        etc.<br>
        <br>
        For at im&oslash;dekomme alle vore ans&oslash;gere gemmer apoteket din
        ans&oslash;gning i vores jobbank i op til 6 m&aring;neder. Efter 6 m&aring;neder
        kasseres din ans&oslash;gning, men du er selvf&oslash;lgelig herefter
        velkommen til at sende en ny.</p>
      <p>Alle uopfordrede ans&oslash;gninger sendes til:<br>
        <a href="mailto:apoteket@albertslundapotek.dk"><strong>apoteket@albertslundapotek.dk</strong></a><strong><br>
        </strong><br>
        Eller sendes pr. almindelig post til:<br>
        <strong>Att.:Vinnie Krogh <br>
        Albertslund Apotek<br>
        Bytorvet 5<br>
        2620 Albertslund Apotek</strong></p>
      <p align="center"><br>
        <br>
        <br>
        <br>
        <a href="#top"><img src="bund_navigation.jpg" width="398" height="29" border="0"></a>
      </p>
      </td>
    <td width="17" valign="top"> <div align="right"></div>
      <font face="Geneva,Verdana,Helvetica" size="2">&nbsp;</font> <div align="left">
        <p> </div></td>
    <td width="3" valign="top" bgcolor="#6699cc"><img src="b_07.gif" width="3" height="70"></td>
  </tr>
</table>
<div align="center">
  <!--#include file="bund.asp"-->
</div>
<%
my_conn.Close
Set SQLstmt7 = nothing
Set SQLstmt11 = nothing
%>
</body>
</html>
Avatar billede flax Nybegynder
24. juli 2002 - 18:42 #13
Jeg er ked af at du ikke har fået svar før nu, men jeg har været optaget af chefen, jeg laver det nu, og du får dine point som tak for hjælpen! 1000 mange tak!! :-)
Avatar billede flax Nybegynder
24. juli 2002 - 18:43 #14
jeg vender lige tilbage og siger om det virkede, men super mange tak for din tid :-)))
Avatar billede tmceu Praktikant
24. juli 2002 - 18:50 #15
Det var så lidt :-)

Du havde nu ikke behøvet at give point, før du er sikker på det virker.
Avatar billede flax Nybegynder
24. juli 2002 - 19:03 #16
he he..det virkede.. Efter et par små justeringer. Se selv på

http://www.albertslundapotek.dk/omapoteket_ledige_jobs.asp

HYep yep 1000 tak du! :-)

Hvis du vil må du gerne hjælpe her også http://exp.dk/spm/238263, jeg kan evt. poste hele filen igen?
Avatar billede tmceu Praktikant
24. juli 2002 - 20:39 #17
Hvis du kigger efter, har jeg forsøgt mig i det spørgsmål men jeg fatter bare ikke dit problem :-)
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester