Jump to content

M.O.S. Studios

Members
  • Posts

    286
  • Joined

  • Last visited

Posts posted by M.O.S. Studios

  1. how meny of each product they bought, how ever the count funcction just represents howmeny differn't products they bought

     

    ie,

    they bought

     

    3 x apples

    1 x orange

    1 x juicer

     

    incoice_pro would have 3 rows as follows:

     

    ref - qty - name

    1      3      apples

    1      1      orange

    1      1      juicer

     

     

    the total would come out like this:

    client_name    invoice_number  Complete    count(*)

    peter griffin            1                  true          3

     

     

    p.s. can mysql do the math of how meny total products?

  2. hey guys,

     

    im trying to send a my sql query that return information about an invoice and return a row count as a column,

     

    table format is

     

    invoices:

    client_name - invoice_number - [...] - `complete`

     

    invoice_prod

     

    ref - qty [...]

     

    soo if invoice_number has 3 rows where ref = invoice_number the db will ander this

     

    client_name    invoice_number  Complete    count(*)

    peter griffin            1                  true          3

     

     

    im not sure whats wrong with my code, any advice helps

     

     

    SELECT `invoice_number`, `complete`, `invoice_prod`.count(*) FROM `invoices`, `invoice_prod` WHERE `invoices`.`index` = `invoice_prod`.`ref`
    LIMIT 0 , 30
    

  3. Hey guys,

      I have a section of my website where users can alter their information, i ask the user to type their password twice to make sure their is no typos within it.

     

    I have a problem when i reload the page after the user submits it.

    for some reason FF auto changes the first password field to match the 2nd password field(even though they have different names), is their any html code that will turn this off

     

    thanks in advance

     

  4. hey guys

      i use the script below to dynamicly fill in a select table, i want to mae the 3rd option (addOption(document.userprofileform.getElementByName(item_id),'New Brunswick', 'Nb/1')) the default selected when the script add it

     

    any ideas?

     

    function ClearOptionsFast(id)
    {
    var selectObj = document.getElementById(id);
    var selectParentNode = selectObj.parentNode;
    var newSelectObj = selectObj.cloneNode(false); // Make a shallow copy
    selectParentNode.replaceChild(newSelectObj, selectObj);
    return newSelectObj;
    }
    
    function addOption(selectbox,text,value)
    {
    var optn = document.createElement("OPTION");
    optn.text = text;
    optn.value = value;
    selectbox.options.add(optn);
    }
    
    function ChangeDropdowns(value,item_id){
    if(value=='CANADA/1/1'){
    addOption(document.userprofileform.getElementByName(item_id),'Northwest Territories', 'Nt/1')
    addOption(document.userprofileform.getElementByName(item_id),'Newfoundland and Labrador', 'Nl/1')
    addOption(document.userprofileform.getElementByName(item_id),'New Brunswick', 'Nb/1')
    addOption(document.userprofileform.getElementByName(item_id),'British Columbia', 'Bc/1')
    addOption(document.userprofileform.getElementByName(item_id),'Manitoba', 'Mb/1')
    addOption(document.userprofileform.getElementByName(item_id),'Alberta', 'Ab/1')
    
    }
    

  5. im sorry, i posted late last night,

     

    the var name is item_id,

    when i use the ChangeDropdowns(value,item_id) function,

     

    for example, this code works

    function ChangeDropdowns(value,item_id){
    if(value=='CANADA/1/1'){
    addOption(document.userprofileform.ship_pro,'Northwest Territories', 'Nt/1')
    }}
    

     

    but i want to replace ship_pro with the variable 'item_id' so that i can control where it put that information with one script. instead of having two scripts that have the exactly the same info just a differn't location

  6. hey guys,

     

    I have drop down menu called country shipping, and thoe other called country billing.

    basicly when come one chooses the country the drop down under it fills with states or provinces

     

    here is the function i use

     

    
    function ClearOptionsFast(id)
    {
    var selectObj = document.getElementById(id);
    var selectParentNode = selectObj.parentNode;
    var newSelectObj = selectObj.cloneNode(false); // Make a shallow copy
    selectParentNode.replaceChild(newSelectObj, selectObj);
    return newSelectObj;
    }
    
    function addOption(selectbox,text,value)
    {
    var optn = document.createElement("OPTION");
    optn.text = text;
    optn.value = value;
    selectbox.options.add(optn);
    }
    
    function ChangeDropdowns(value,item_id){
    if(value=='CANADA/1/1'){
    addOption(document.userprofileform.getElementByName(item_id),'Northwest Territories', 'Nt/1')
    addOption(document.userprofileform.getElementByName(item_id),'Newfoundland and Labrador', 'Nl/1')
    addOption(document.userprofileform.getElementByName(item_id),'New Brunswick', 'Nb/1')
    addOption(document.userprofileform.getElementByName(item_id),'British Columbia', 'Bc/1')
    addOption(document.userprofileform.getElementByName(item_id),'Manitoba', 'Mb/1')
    addOption(document.userprofileform.getElementByName(item_id),'Alberta', 'Ab/1')
    
    }
    

    here is how its called

     

    <select name="ship_con" onChange="ClearOptionsFast('ship_pro'),ChangeDropdowns(this.value,'ship_pro');">
    			<option value="CANADA/1/1" SELECTED>CANADA</option>
    </select>
    

     

     

    now when i replace the variable 'id_value' with the name of the drop down it works fine, but when i replace it with the variable, it dosn't work, any one see the prob?? thanks in advanced

  7. ok guys i got it done, thatnks for all your help

     

    here is the code i did

     

    java header

    <script language="JavaScript" type="text/javascript">
    function GetXmlHttpObject()
    {
    var xmlHttp=null;
    try
    {
    // Firefox, Opera 8.0+, Safari
    xmlHttp=new XMLHttpRequest();
    }
    catch (e)
    {
    //Internet Explorer
    try
      {
      xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
      }
    catch (e)
      {
      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    }
    return xmlHttp;
    }
    
    
    function rate_data(id){ 
        xmlhttp=GetXmlHttpObject();
        if (xmlhttp==null) {
            alert ("Your browser does not support AJAX!");
            return;
        }
        xmlhttp.onreadystatechange=function() {
            if (xmlhttp.readyState==4 || xmlhttp.readyState=="complete"){
        document.getElementById('rate-responce').innerHTML=xmlhttp.responseText; 
            }
        } 
        var url="send.php";
        url=url+"?score="+id;
        xmlhttp.open("GET",url,true);
        xmlhttp.send(null);
    }
    </script> 
    
    
    

     

    then for each star icon i did this

    				<li><a href="#"  onclick="rate_data(1);" title="1 out of 10" class="r1-unit rater" rel="nofollow">1</a></li>
    

     

    thanks again for all the help

  8. Hey guys,

      Im working on a site that will have streaming video, for each video their will be a ability to comment on it much like you tube.

     

    I'm torn between two ways to build this, the final goal will be minimizing loading time and strain on the server.

     

    option 1.

          Each video have 2 tables, one for the video information, the other for its comments.

     

    option 2.

          all the coments are stored in one table with a reference number linking it to the video

     

    any other sugestions are welcome,

     

    any ideas?

     

    thanks in advance

  9. hey guys,

     

      I thought i was figuring out this css stuff but now one again i lernt i am not

     

    2 problems:

     

    1. the <div class='center' > tag stays the same size regarless of content, my content is not showing up even if i do overflow:visible;

     

    2. my scroll bars are not change color at all, i know this never works on ff or safari, but it usaly does on ie

     

    here is the css

     

    <style type='text/css'>
    
    body{
    border-width:0px;
    padding:0px;
    margin:0px;
    font-size:90%;
    width:100%;
    height:100%;
    scrollbar-base-color: #DA1B1B;
    scrollbar-arrow-color: #000000;
    scrollbar-3dlight-color: #ffffff;
    scrollbar-darkshadow-color: #2D2400;
    scrollbar-face-color: #DA1B1B;
    scrollbar-highlight-color: #DA1B1B;
    scrollbar-shadow-color: #ffffff;
    scrollbar-track-color: #DA1B1B;
    }
    
    .header{
    width:640px;
    height:186px;
    clear:both;
    float:none;
    position:relative;
    }
    
    .center{
    width:900px;
    height:100%;
    left: auto;
    clear:both;
    float:none;
    overflow:visible;
    position:relative;
    background: #000000 url(../../images/background/contentbg.png);
    background-repeat: repeat-y;
    }
    
    .center #content{
    width:800px;
    height:760px;
    left: auto;
    clear:both;
    float:none;
    overflow:hidden;
    position:relative;
    text-align: left;
    }
    
    .center  #menu{
    height:75px;
    text-align: center;
    font-family: Comic Sans MS, san sarif, Arial;
    font-size: 30px;
    font-weight:heavy;
    font-color:#ffffff;
    }
    
    .center #menu a{color: #FFFFFF;}
    .center #menu a:hover{color: #DA1B1B;}
    .center #menu a:visited{color: #FFFFFF;}
    .center #menu a:active{color: #DA1B1B;}
    
    
    .footer{
    width:900px;
    left: auto;
    clear:both;
    float:none;
    position:relative;
    }
    
    .bottom{
    clear:both;
    width:100%;
    height:100%;
    float:left;
    position:relative;
    background: url(../../images/background/citywhite.png);
    background-repeat: repeat-x;
    }
    </style>
    

     

    here is the html

     

    <div class="bottom" align=center>
        <div class="header"><img src='images/background/logo.png'></div>
    
        <div class="center" align=center>	
    <div id='menu'> <a href='index.php'>Home</a>  <a href='index.php'>Merchandise</a>  <a href='index.php?page=custom&file=2'>Media</a>  <a href='index.php?page=custom&file=7'>Contact</a> </div>
    <div id='content'>
    <div class='video-title'>
    <acronym title="Red Avenger makes a new friend after escaping from the clutches of an angry hill billy."><p>A Taste For P.P.</p></acronym>
    <table width='100%'>
    	<tr width='100%'>
     		<td width='50%'>
    			<div class='video-subtitle'>SEASON: 1</div>
    		</td>
    		<td width='50%'>
    			<div class='video-subtitle'>EPISODE: 4</div>
    		</td>
    	</tr>
    </table>
    </div>
    
    <table width='100%'>
    <tr width='100%'>
    	<td width='100%' align='center'>
    
    	<div id="player">This text will be replaced</div>
    	</td>
    </tr>
    </table>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    Playlist
    
    <center>
    	<div class='video-playlist'>
    	<img src='admin/upload/episodes/ra.gif'><br><a href='index.php?page=custom&file=2&epi=4&sea=1'>A Taste For P.P.'</a><br><br>		<img src='admin/upload/episodes/Hero1.jpg'><br><a href='index.php?page=custom&file=2&epi=5&sea=1'>Hero For Hire I / V'</a><br><br>		<img src='admin/upload/episodes/Hero2.jpg'><br><a href='index.php?page=custom&file=2&epi=6&sea=1'>Hero For Hire II / V'</a><br><br>		<img src='admin/upload/episodes/Hero3.jpg'><br><a href='index.php?page=custom&file=2&epi=7&sea=1'>Hero For Hire III / V'</a><br><br>		<img src='admin/upload/episodes/Hero4.jpg'><br><a href='index.php?page=custom&file=2&epi=8&sea=1'>Hero For Hire IV / V'</a><br><br>		</div>
    </center>
    
    </div>
        </div>
    
        <div class="footer"></div>
    </div> 
    
    

     

    thanks in advance any ideas help

  10. the css

    .menu_ph { display:block; width:100%; border:0px;}
    
    .menu_rows { display:block; height:100%; white-space:nowrap; clear:left;}
    
    .menu_leftcell{
    display:block;
    float:left;
    height:40px;
    width: 34%;
    white-space: normal;
    }
    
    .menu_cell {
    display:block;
    float:left;
    height:40px;
    width: 32%;
    white-space: normal;
    }
    
    .menu_cell #cellinfo
    {
    height:40px;
    line-height:40px;
    background:#000;
    text-align: center;
    font-family: Comic Sans MS, san sarif, Arial;
    font-size:30px;
    font-weight:heavy;
    font-color:#ffffff;
    }
    

     

     

    <div class="menu_ph">
      <div class="menu_rows">
        <div class="menu_leftcell" style="text-align:right; "><img src='images/menu/left.png'></div>
        <div class="menu_cell" style="text-align:center; "><div id='cellinfo'><?php echo MENUS; ?></div></div>
        <div class="menu_cell" style="text-align:left; "><img src='images/menu/right.png'></div>
      </div>
    </div>
    
    

  11. Hey guys,

    I'm trying to make a menu that consists of 3 parts,

    1 left side 20wx40h image

    2.contents *800wx40 black square with the option inside

    3.right side 20wx40h image

     

    * 800 minimum but will expand if content expands..

     

    and the whole thing to be centered,

    i know how to do this in tables but I'm trying to embrase the future off css and it killing my brain

     

    any ideas thanks in advance

     

    the css

    .menu_ph{
    display:inline-table;
    width:800px;
    height:40px;
    background: transparent;
    text-align: center;
    }
    
    .menusides{
    display:table-cell;
    width:20px;
    height:40px;
    }
    
    .menucontent{
    display:table-cell;
    width:800px;
    height:40px;
    background:#000;
    text-align: center;
    font-family: Comic Sans MS, san sarif, Arial;
    font-size:30px;
    font-weight:heavy;
    font-color:#ffffff;
    }
    
    .menucontent a{
    text-decoration: underline;
    }
    

     

    the html

    <div class='menu_ph'>
    <div class='menusides'><img  src='images/menu/left.png'></div>
    <div class="menucontent"><?php echo MENUS; ?></div>
    <div class='menusides'><img  src='images/menu/right.png'></div>
    </div>
    

  12. i have a div that has a bgimage, i have another placed in that <div> and i want to align it along the bottom.

     

    how ever no matter what i try the image stays along the top

     

     

    css

    
    .logo{
    width:100%;
    height:255px;
    background:transparent url(../../images/background/citywhite.png);
    background-repeat: repeat-x;
    }
    

     

     

    html

    <div class='logo' align='center'><img src='images/background/logo.gif'></div>
    

     

    any ideas???? thanks in advance

  13. awesome,

    i had to change it a bit to get it to work, but i got it,,, thanks for all the help,

     

    this is the final code

     

    css

    module_s1				{margin:0px 0px 7px 0px; width:100%; background:url(../images/mainmenu_top.gif) no-repeat 0 0 #1e2224}
    .module_s1 div 			{background:url(../images/mainmenu_bottom.gif) no-repeat bottom left}
    .module_s1 div div		{}
    .module_s1 div div div	{padding:0px 0px 14px 0px; width:194px}
    .module_s1 div div div div	{background:none; padding:0px 0px 0px 0px;}
    .module_s1 h3			{font:bold 17px Arial; color:#f2f4f7; padding:17px 0px 0px 27px; margin:0px 0px 12px 22px; background:url(../images/h3_bullet.gif) no-repeat left 17px}
    .module_s1 table		{}
    .module_s1 td 			{padding:0px 0px 5px 0px;}
    .module_s1 td div		{margin:0px 0px 0px 0px; padding:0px 0px 0px 0px; background:none; /*width:138px !important*/}   /*sub_main_menu indent*/
    <!---.module_s1 a			{background:url(../images/mainmenu_bullet.gif) no-repeat left top; padding:0px 0px 0px 32px; color:#ffffff !important; font:normal 13px Arial; text-decoration:underline; margin:0px 0px 0px 32px;}	/* Item Of Menu Main */-->
    .module_s1 a			{padding:0px 0px 0px 0px; color:#ffffff !important; font:normal 13px Arial; text-decoration:underline; margin:0px 0px 0px 0px;}	/* Item Of Menu Main */
    .module_s1 ul                   {margin: 10; padding: 0; list-style: none; } 
    .module_s1 li                   {padding-left: 35px; background: url( ../images/mainmenu_bullet.gif ) 20px 2px no-repeat;}
    .module_s1 a:hover		{text-decoration:none}
    .module_s1 img			{width:0px; height:0px}
    
    .mainlevel				{} 	
    a.mainlevel:visited 	{color:#2b465b;}
    a.mainlevel:hover 		{color:#2b465b;}
    

     

     

    html

    <div class="module_s1"><div><div><div>
    <h3>Clothing</h3>
    <ul>
      <li><a href='index.php?page=store&prod=12' class="mainlevel" >Trofeo track suit</a>
    </ul>
    </div>
    </div>
    </div>
    </div>
    

  14. sorry this is the html

     

    <div class="module_s1"><div><div><div>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td>
                  <h3>Clothing</h3>
                </td>
             </tr>
            <tr align='left'>
           <td align='left'><a href='index.php?page=store&prod=11' class="mainlevel" >Sereno suit w/embroidery</a>
           </td>
        </tr>
    </table>
    </div>
    </div>
    </div>
    </div>
    

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.