Jump to content

biggieuk

Members
  • Posts

    159
  • Joined

  • Last visited

Posts posted by biggieuk

  1. Hi all,

     

    I have a fairly large form of around 50 textboxes, checkboxes & radio buttons.

     

    Each form section is broken up into sections for instance:

     

    Contact

    Name

    Position

    Address

    ....

     

    For each section I have named the name tag of each like so:

     

    name="contact[name]"

     

    This is so that I can handle the $_POST data in arrays.

     

    My question is, what would be the best database structure for this? A collegue suggested using serialized arrays?

     

    I don't want to have to create a database field for each item on the form but I need to be able to retreive this data based on a userid also.

     

    Thanks for any help/ guidance with this.

  2. [search]htaccess dummy re-write help[/search]Hi guys,

     

    Im working on tidying up my urls using some htaccess vodoo but need a bit of help with this.

     

    Heres my htaccess:

     

    RewriteEngine On
    
    RewriteRule ^([^/]*)\.html$ /index.php?page=$1 [L]
    
    RewriteRule ^([^/]*)/([^/]*)\.html$ /index.php?page=$1&id=$2 [L]
    

     

    The dynamic link is:

     

    http://www.website.com/index.php?page=news&id=5

     

    which using the above htaccess is now:

     

    http://www.website.com/news/5.html

     

     

    Any ideas how I can edit this so that I can have some dummy text at the end, like so:

     

    http://www.website.com/news/5/Blah-Blah-Blah.html ?

     

    Where 'Blah-Blah-Blah' could be anything.

     

    Thanks!

  3. Hi all,

     

    I am trying to do what is normally a simple task of positioning a 'position:absolute' div over a 'position:relative' div containing and img tag.

     

    Here is a (amazingly drawn) sample of what it looks like in all modern browsers but IE7:

     

    2lbe26t.png

     

    In IE7 the green box for some reason is behind the big grey banner?

     

    here is my css:

     

    #green_box {
    background:url(images/layout/business-card.png) no-repeat;
    width:363px;
    height:190px;
    text-indent:-1000em; 
    position:absolute;
    margin:17px 0 0 29px;
    z-index:999;
    }
    
    
    /**********  Feature Box **********/
    
    #grey_container {
    position:relative;
    width:947px;
    margin:34px auto 0 auto;
    z-index: 0;
    }
    
    
    a.arrow_left {
    position:absolute;
    z-index:2;
    left: 20px;
    top: 89px;
    width: 21px;
    height: 38px;
    text-decoration: none;
    background:url(images/feature/arrow-left.png);
    }
    
    a.arrow_right {
    position:absolute;
    z-index:2;
    right: 20px;
    top: 89px;
    width: 21px;
    height: 38px;
    text-decoration: none;
    background:url(images/feature/arrow-right.png);
    }
    

     

    The grey box html is as follows:

     

    <div id="grey_container">
                	<a href="#" class="arrow_left" title="Previous"></a>
                    <a href="#" class="arrow_right" title="Next"></a>
               		<img src="images/feature/banner.jpg" height="214" width="947" alt="Banner" />
                    <div id="navi"></div>
    </div><!-- grey_container -->
    

     

    Any ideas? Im going mad.

     

    Thanks!

     

     

  4. Thanks for your reply but that's unfortunately not what im looking for.

     

    I'm looking for a way to remotely tell the iframe on my page to load up in another page once the submit button has been pressed.

     

    I'm guessing this is not possible unless i have some sort of access to the iframe code itself however i thought id give it a shot.

     

    Thanks

  5. Hi all,

     

    I know this is a long shot but i have an iFrame to collect customer details and display the best deals for them. Unfortunatly I have no control over the iFrame apart from styling.

     

    Is it at all possible for me to control the submit actions so that when the user clicks a button inside the iframe the next page loads into a different parent page?

     

    Currently the iframe is on my hompeage and ideally i would like the next iframe page to load into another page on my website.

     

    Is this possible or am i dreaming?

     

    Thanks

  6. Hi all,

     

    I am creating a web service using Visual Studio in .Net.

     

    Basically, a value is passed in, this could be an ID, postcode or surname and i want the webservice to send values to another ASP(classic) webpage i have. This then processes the passed through variables and returns an XML feed which i need to be passed back to the original function.

     

    I know this probably sounds like a roundabout way of making this but i already have the ASP part working and need to get this working this way if possible.

     

    Would i need to use Ajax to pass these variables from a .NET webservice to another asp page and then back to the function or is there another way i can do this?

     

    Thanks very much for any help/ clarity with this.

     

     

     

     

  7. The textbox is currently floated left as is the arrow so they line up horizontally.

     

    Thats pretty much it but heres therest of my code.

     

    .dropdowntextbox { //This is the textbox
    	  font-size: 10px;
    	  font-family:Arial;
    	  width : 121px;
    	  height:17px;
    	  font-weight:normal; 
    	  background-color:#E8DFEB; 
    	  padding : 1px;
    	  border:#7F9DB9 solid 1px;
    	  border-right:none;
    	  color:#000000; 
    	  float:left;	
    	  font-family:Verdana; 
    }
    
    .btnList {  // This is the button floated left next to it.
    	  width : 22px;
    	  height:17px;
    	  background-color:#E8DFEB; 
    	  padding : 1px 1px 1px 3px;
    	  border:#7F9DB9 solid 1px;
    	  border-left:none;
    	  color:#000000;
    	  font-weight:bold; 
    	  float:left;
    	  cursor:pointer;
    	  overflow:hidden;
    }
    
    #dropdownwindow {  //  This is the dropdown window that hides/shows
    	width:300px;
    	height:265px; 		 
    	background-color:#FDFBFF;
    	border:1px solid #D2D2D2; 
    	border-bottom:none;
    	position:absolute;
    	z-index:1000;
    	display:none;
    	float:left;			
    }
    

     

     

    my html:

     

    <div class="inputContainer">  <! --  Around the whole thing -->
    <input type="text" name="txtMedia" id="txtMedia" class="dropdowntextbox" onkeyup="search_delay(this, this.value);" onClick="make_blank(this.id,'Search Media');" value="Search Media" /><div class="btnList" onClick="btn_search();"><img src="../applications/dropdown/images/down.gif" width="16" height="16"/></div>
    
    
    
    <div id="dropdownwindow" style="display:none;">	
    ....
    ..
    
    </div>
    </div> <!-- Close inputContainer --> 	
    

     

    thanks.

  8. Hi all,

     

    I have a javascript component which adds to & deletes from a Js array.

     

    I need to pass this array through the querystring to my next page.

     

    Is it possible to assign the contents of the javascript array to a html hidden field so i can pass the field contents through the querystring?

     

    thanks very much.

  9. Hi all,

     

    I have a textbox(with an arrow image on the end so it acts a dropdown list). The textbox is currently floated left as is the arrow so they line up horizontally.

     

    When the arrow is selected i want a hidden div of 200 x 200px to display underneath this textbox but it is currently to the right of the textbox.

     

    The div box is set to absolute positioning so that it displays over all the other content on the page under the textbox.

     

    Does anybody have any ideas as to how i can get this div box to display directly underneath my textbox so it acts like a dropdown?

     

    thanks very much.

     

     

  10. Hi all,

     

    I have created a custom dropdown box which when clicked loads a dynamically generated xml file and populates a DHTML Treeview.

     

    This process is currently taking far too long to load the div once clicked (4-6 seconds). Is it possible to somehow use the onload of the page to load this hidden div before the user clicks my dropdown?

     

    Simply using the function i have now adds the 4-6 second delay onto the page loading time and the user is unable to do anything until this has loaded. Can this be loaded completely in the background so the user can still interact with the page during this 4-6 sec delay?

     

    thanks for any help with this.

  11. Thanks for your reply, I looked into the sleep function but wasn't too keen on freezing the client for however many miliseconds.

     

    Here is the solution i found:

     

    function search_delay(element, objSearch) {
    
    if(objSearch == ''){
    	hideBox('window');
    } else {
    
    	if ( element.zid ) {
    		clearTimeout(element.zid);
    	}
    	element.zid = setTimeout("show_loading_message('" + objSearch + "');",200);
    	}
    }
    

     

    and the input field:

     

    <input type="text" name="txtMedia" id="txtMedia" onkeyup="search_delay(this, this.value);"....
    

     

     

    thanks.

     

  12. Hi all,

     

    i have a textbox that 'onkeyup' performs a query to build a dynamic xml file which populates a dhtmlxTreeView component i am using.

     

    If i type into the text box fairly slowly it returns the correct results but if i type faster it cant handle the constant xml requests and returns multiple entries.

     

    Is it possible to somehow slow down the input to the textbox or wait a certain amount of time before performing the query?

     

    thanks for help with this.

  13. Thanks very much, seems to work well, althought the xml format is slightly wrong for my purpose.

     

    It is returning a </item> tag after each SubCompany:

    <item id="parent" value="<%= Company %>" >
          <item id="child" value="<%= SubCompany %>" >
    </item>
          <item id="child" value="<%= SubCompany %>" >
    </item>
    <item id="parent" value="<%= Company %>" >
          <item id="child" value="<%= SubCompany %>" >
    </item>
          <item id="child" value="<%= SubCompany %>" >
    </item>
          <item id="child" value="<%= SubCompany %>" >
    </item>
    ...................

     

    Where's i need it so its only closing off the parent after the SubCompanys have been returned:

     

    <item id="parent" value="<%= Company %>" >
          <item id="child" value="<%= SubCompany %>" >
          <item id="child" value="<%= SubCompany %>" >
    </item>
    <item id="parent" value="<%= Company %>" >
          <item id="child" value="<%= SubCompany %>" >
          <item id="child" value="<%= SubCompany %>" >
          <item id="child" value="<%= SubCompany %>" >
    </item>
    ...................

     

    Any ideas?

     

    Thanks

     

  14. Hi all,

     

    Im struggling to figure out the best solution for the following:

     

    I have two tables:

     

    table1 contains columns called MainID, Company.

    table2 contains columns called SubID, SubCompany, MainID.

     

    table2 has many records assigned to each MainID.

     

    I have an sql query that retrieves each record from table2 and displays which MainID it is assigned to.

     

     

    With this data i am trying to dynamically populate an XML treeview but am having trouble thinking up a way to loop through each record and construct something along the lines of:

     

    <item id="parent" value="<%= Company %>" >
          <item id="child" value="<%= SubCompany %>" >
          <item id="child" value="<%= SubCompany %>" >
    <item id="parent" value="<%= Company %>" >
          <item id="child" value="<%= SubCompany %>" >
          <item id="child" value="<%= SubCompany %>" >
          <item id="child" value="<%= SubCompany %>" >
    <item id="parent" value="<%= Company %>" >
          <item id="child" value="<%= SubCompany %>" >
    ..............
    

     

    Thanks for any help with this, please ask me to try another explanation if that is slightly confusing  :S

     

     

  15. Hi all,

     

    i am looking to create a dropdown box that allows for multiple selections via a checkbox.

     

    The idea i am going for can be seen on: http://www.monster.co.uk/  if you click on more search options then industries.

     

    Could anyone give me some guidance as to creating a dropdown menu like this? I know the standard html dropdown does not provide this facility so i am assuming some sort of DHTML, Javascript thing could produce this?

     

    thanks for any help or samples.

     

    Dan

  16. Hi all,

     

    I am automating a paypal transaction window via my website using the following url:

     

    https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=my@website.com&item_name=MyProduct&item_number=1&amount=14.99&return=http://mywebaddress.return.com&currency_code=USD&notify_url=http://mysite.com/ipn.php

     

    The bold text shows the sensitive data i don't want the user to be able to change.

     

    Is there a PHP function to decrypt a URL so that the user cannot edit a link to the paypal system?

     

    thanks for any help with this.

     

    Dan

×
×
  • 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.