Jump to content

simflex

Members
  • Posts

    47
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

simflex's Achievements

Member

Member (2/5)

0

Reputation

  1. I am a classic asp/.net/sql server developer. Once in a while, I make a foray into php and I have not done it consistently well enough to get a hang of it but doesn't discourage me from trying. However, one thing I have noticed is that someone is seriously in need of help. S/he posts a question. Several well intentioned helpers come up with some useful suggestions on how to help the OP. Some provide sample code. Then there is *always* someone who feels he needs to be heard and then comes up with some silly comments, none of which helps the OP looking for help. Whether the music is mine and I decide to sell it, how does your comment help me???? You can decide that you have a solution to my problem but since I am not giving it away, you would not help me. That's completely within your rights but don't come here wasting a space just to make some unrelated comments. I said I have some music in our database. There is no way a reasonable individual would infer that it is mine and even if it is, I am not asking a Priest if I can or cannot sell it. I am asking for CODING help. That is why NO ONE but you ventured into that moral space.
  2. Thank you kicken for providing the most useful information to my question.
  3. First ginerjim, With all due respect, you shouldn't be the moral warrior here. Second, I am doing this for a musical group who has the right to charge for their music, thank you.
  4. Hi Jacques, I am beginning to think that it is the way that I frame my questions that give the experts the wrong impression about what I can or cannot do. I have actually implemented, quite successfully, shopping cart app. If I didn't specify so, I would like to say that the only issue I am struggling to figure out is how to show the product, the price and download link. The big issue for me is when a user clicks the download link, rather then show the product to download but to show them pay link and if the user pays, then the download reappears and this time, the user is able to download the music. Unless I am wrong, I think is different from straight up shopping cart where user clicks add to cart, checkout or continue etc. So, the issue with me is NOT how to implement shopping cart because I have done that using php, classic asp and asp.net. The issue is how to present download and user clicks on download, rather than show the product to download but to show pay for the item link. Sorry if it makes look like I need to hire a programmer. As you know from experience, no matter how good you think you are, there are things you struggle to figure out. thanks for you help
  5. Thank you guys so much. This is probably the part you may dislike the most but can you please give me some sample of how to do this? If there is a link to where this has been done before, that would be very helpful as well.
  6. Dear Experts, We have a lot music tracks on our database that we would like to display on a three -column per row layout on our website. Our objective is to have each music and the amount associated with that music next to it and then a download button or link. If a user clicks on that download link, then a link or icon displays asking the user to pay for the music s/he is attempting to download. This is kind of like shopping cart except user can download after making payment. The part that is presenting difficulty for us how to display the music track, the amount, the download link and when user clicks that download link, show pay. Any ideas how to approach this? If there is any link that can help, please let me know. Thanks a lot in advance.
  7. Dear experts, I really, really need your expert assistance. we have an id that when entered into a search box, displays the same id you searched with, if that id is valid and it exists. On the same search box, you can search with a zip code or an address. Issue we have with the id is that it has to follow a certain format for it to produce search results. For instance, if the id has all digits, then a space is to be inserted after the first 2 digits. If has an N or D after the first 2 digits and no additional digits or characters, then no formatting is needed. If it has mostly digits and GG in between the digits, then a space after the first 2 digits as described above and 2 spaces before GG need. If there is N or D after first 2 digits and GG in between the digits, then only 2 spaces before the GG (35D12543 GG125) If the user is searching with zipcode, then we need to recognize that it is zipcode. In other words, if all digits and the digits are less than 6 digits, then it is zip code, no formatting. Now, this is where the real trick comes in. If user is searching by address, how do I modify the code to instruct it NOT to format the address so user can get results? Here is the code that I have so far. The code seems to address the issue of address and zip code but isn't reformatting the ID correctly so that it is reformating ID if ID has ALL digits like 35 1254311235 but it is not reformatting ID if ID has digits with GG in between like 3512543 GG125. There should be a space after 2 digits and 2 spaces before GG the regex for some reason assumes that the GG is the 10th and 11th character and therefore reformats correctly if ID has GG as 10th and 11th character. If the characters don't fall within the 10th and 11th, it doesn't work. Can you please, please take a look at my regex and see what needs fixing? Please forgive me for the long text and thank you very much in advance for your patience and assistance. $patterns = array( '/^(\d\d)(\d{4,})$/', '/^(\d\d[\dDN]\d{6})(GG\d*)$/' ); $replacements = array( '$1 $2', '$1 $2' ); $_GET['id'] = $id; $id = preg_replace( $patterns, $replacements, $_GET['id'] );
  8. Hello again Experts, I have 2 radio buttons called IsSpecial. The first radio button has a value of Yes and the other No. We are trying to determine if a particular product is going to be on promos. If the user clicks the Yes radio button then promo start date, end date and, promo price become visible so user can fill out these and other boxes. If the user clicks the No radio button then the form fields mentioned above, startdate, enddate and, promo price, are hidden. The following code validates most of the form fields except the ones mentioned above. I am trying to figure out how to NOT validate the form fields that are not visible; only validating them when they are visible. For instance, if the radio button value of Yes is selected, all visible form fields, including state date, end date and promo price become visible and therefore must be completed. If is skipped, we would like to raise exceptions. So when completing form fields that are visible, we don't want the hidden form fields to be validated Any ideas how to handle validating only visible forms but not hidden forms? BTW: only 4 items can be hidden or visible. These are pstartdate, penddate, unitprice and txtprice. Only txtprice is hidden when Yes radio button is selected. Here is the relevant code I have so far. Thanks a lot in advance. <head> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function validate() { missinginfo = ""; if (document.form.catdescription.value == "0") { missinginfo += "\n - Category CANNOT be blank"; } if (document.form.pcode.value == "") { missinginfo += "\n - Product Code CANNOT be blank"; } if (document.form.pname.value == "") { missinginfo += "\n - Product Name CANNOT be blank"; } if (document.form.pdescription.value == "") { missinginfo += "\n - Product Description CANNOT be blank"; } if (( form.IsSpecial[0].checked == false ) && ( form.IsSpecial[1].checked == false )) { missinginfo += "\n - please check Yes or No"; } if ((document.form.pphoto.value == "") || (document.form.pphoto.value == "NA")) { missinginfo += "\n - Photo is either blank or does not contain NA"; } if (document.form.file2.value == "") { missinginfo += "\n - Browse a picture to upload"; } if (missinginfo != "") { missinginfo ="_____________________________\n" + "Please ensure that:\n" + missinginfo + "\n_____________________________" + "\nPlease re-enter and submit again!"; alert(missinginfo); return false; } else return true; } // End --> </script> <script type="text/JavaScript"> <!-- Begin function ChangeDiv(id) { if(id == "No") { document.getElementById('nof').style.display = "block"; document.getElementById('yesf').style.display = "none"; } else { document.getElementById('nof').style.display = "none"; document.getElementById('yesf').style.display = "block"; } } // End --> </script> </head> <table> <tr> <td class="body1" div align="right">Product Code:</td> <td width="73%"><input type="text" name="pcode"></td> </tr> <tr> <td class="body1" div align="right">Product Name:</td> <td><input type="text" name="pname"></td> </tr> <tr> <td class="body1" div align="right">Product Description:</td> <td> <textarea name="pdescription" cols="30" rows="5" value="<%=strUserText%>"></textarea> </tr> <tr> <td nowrap>Is product on PROMOS?</td> <td> <INPUT Type=Radio Name="IsSpecial" Value="Yes" onClick="ChangeDiv('Yes')">Yes<br> <INPUT type="Radio" name="IsSpecial" value="No" onClick="ChangeDiv('No')">No </td> </tr> </TABLE> </TD> <TD VALIGN="CENTER" ALIGN=CENTER > <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=4 BORDERCOLOR="YELLOW" > <tr> <td class="body1" div align="right"> <div id="yesf" style="display:none;"> Promo Start Date: <input type="text" name="pstartdate" class="normaltxt"><br> Promo End Date: <input type="text" name="penddate" class="normaltxt"><br> PROMO Price: <input type="text" name="txtsprice" value=""> </div></td> </tr> <tr> <td class="body1" div align="right"> <div id="nof"> Regular Price: <input type="text" name="unitprice" value=""> </div></td> </tr> <tr> <td class="body1" div align="right">Photo: <input type="text" name="pphoto" value=""></td> </tr> <tr> <td div align="right">How many in stock: <input type="text" name="cstock" value=""></td> </tr> <tr> <td class="body1" div align="right">Attach for IMG folder:</div> <INPUT NAME="file1" TYPE="FILE" value="" SIZE=30></td> </tr> <tr> <td class="body1" div align="right">Attach for SMALL folder:</div> <INPUT NAME="file2" TYPE="FILE" value="" SIZE=30></td> </tr> </table> </td> </tr> </table> <hr color="silver"> <table width="100%" border="0" cellspacing="4" cellpadding="4"> <tr> <td><div align="center"> <input type="image" name="submit" id="submit2" title="submit to db." border="0" src="images/submitbutton.jpg" width="142" height="47" alt="Submit Button"> </div></td> </tr> </table>
  9. I have made some progress with this. Right now, this is what I have: <head> <style type="text/css">span id='1' {display:none;}</style> <script type="text/javascript" src="jqueryMsg.js"></script> </head> <asp:TextBox ID="chck1" runat="server" Width="75px" Text = "0" onchange="caltot('tot_amt1','chck1','onetime1','multi1')" Ontextchanged = "getFednameamt"></asp:TextBox> <span id='1'>focus fire</span> <script type="text/javascript">window.onload = (function () { try{ $("input:text").focus(function () { $(this).next("span").css('display','inline').fadeOut(1000); }); }catch(e){}});</script> This works. However, I would like to have this message: <span id='1'>focus fire</span> display on a new window once the textbox is clicked. Any ideas how I can get this done? That's all that is left now. Thanks again in advance for your assistance.
  10. Hello Experts, I beg for your assistance. I have a few textboxes similar to this one below: <span style="color:#f00; margin-left:0;" onmouseover="alert('IMPORTANT REMINDER: When pledging with CHECK payment, please enter the CHECK amount and check the box to your right');"><asp:TextBox ID="chck1" runat="server" Width="75px" Text = "0" onchange="caltot('tot_amt1','chck1','onetime1','multi1')" Ontextchanged = "getFednameamt"></asp:TextBox></span> WHen a user clicks on the textbox to enter an amount of money, we would like a message similar to the demo on this link: http://jqapi.com/#p=focus to be displayed. The only thing that we would like to change is the content. We can handle that. Please assist if you can. Thanks a lot in advance.
  11. just a bunch of classes and some additional include files <?php #------------------------------------------------------------------------------- # # Include all relevant files. include_once("config.php"); include_once("tools.php"); include_once("logtools.php"); include_once("htmltools.php"); include_once("nettools.php"); #=============================================================================== # # Application class # # An object used to represent the application itself, and provide functionality # specific to the application. # #=============================================================================== class Application extends Object { #----------------------------------------------------------------------------- # # Constructor. # # Argument : none. # Returns : nothing. # #----------------------------------------------------------------------------- function Application() { } } # class Application. #------------------------------------------------------------------------------- This is not all of it, just snip
  12. Shawn, yes this ->How are you invoking the script? works. Ken, I fire up a browser and type localhost/filename.php
  13. hi Shawn, Yes, it does: <?php #=============================================================================== ... ...
  14. hello team, can you please look at this code snippet and tell me why it is showing the following data this way? <?php # jeff Exp $ include("app.php"); $page->set("title", "Business & Commerical"); $what = $page->getvar("what"); $type = $page->getvar("type"); $dt = new xDataTable('width="500"'); $form = new Form(); if($what == "submit") $html->set("readonly", true); $dt->header($_types{$type} . " Quote"); $form->get_contact_form(true); When I run it, it shows like this: set("title", "Business & Commerical"); $what = $page->getvar("what"); $type = $page->getvar("type"); $dt = new xDataTable('width="500"'); $form = new Form(); if($what == "submit") $html->set("readonly", true); $dt->header($_types{$type} . " Quote"); $form->get_contact_form(true); switch ($type) { case "comp": $dt->left("Business Type:"); $dt->cell($html->select("business_type", $_business_type, 1, "", $page->getvar("business_type"), "(select)")); $dt->left("Federal Tax ID:"); $dt->cell($html->textfield("tax_id", $page->getvar("tax_id"), 12)); $dt->left("If Individual, Owner SSN#:"); $dt->cell($html->textfield("ssn", $page->getvar("ssn"), 12)); $dt->cell("Spouse SSN#:"); $dt->cell($html->textfield("spouse_ssn", $page->getvar("spouse_ssn"), 12)); just a small sample. What am I doing wrong? Thanks alot in advance
×
×
  • 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.