Jump to content

elabuwa

Members
  • Posts

    74
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Male

elabuwa's Achievements

Member

Member (2/5)

0

Reputation

  1. Hi guys, I would like to know if there is such as way where one person's camera feed can be streamed to many people and where the viewers are able to interact with that streamer through voice/audio only. This is for an idea which is to be used to set up distance lecturing scenario's where the lecturer is teaching the through the audio + video feed and the student are viewing it. If they have any questions they can ask it from the lecturer. Any app or any details on where and what to look for is much appreciated. I apologise if this has been posted in the wrong section. Cheers Ela Buwa
  2. Hi Spring, thank you for your reply. What framework should I be using to get this up an running? jquery, json etc? I'm a noob when it comes to ajax
  3. sorry boys. I have added an unnecessary function. please ignore the err_check function. echo "<script language='javascript'>success();</script>"; calls the the alert and window.close procedures. I even get the alert.
  4. Hi guys, I have read that the window.close won't work unless the window was opened through window.open. Eventhough I have the window opening through window.open method the window.close simply wont close the window. Below is my code. I appreciate you help as I am desperate to finish my project and this is the only thing between me and the closed project. I have this in the <head> in the parent window. <script language="javascript"> function MM_openBrWindow(theURL,winName,features){ var left = (screen.width/2)-(800/2); var top = (screen.height/2)-(560/2); features = features + ",left=" + left; window.open(theURL,winName,features); } </script> the left and top is to center the window which is working. Then I have the below code in my button which is to open the window. <input type="button" value="E-MAIL" onClick="MM_openBrWindow('email.php?camp_id=<?php echo $encrypted; ?>','','width=860,height=600'); return false"/> The $encrypted is created beforehand and the window gets opened as well. Now in the popup window... Up on submitting a form, I need the popup to close after saying 'email has been sent'. function err_check(){ var email = document.getElementById('to_email').value; if(email.length==0){ alert('Please Enter Email Address'); return false; } var AtPos = email.indexOf("@") var StopPos = email.lastIndexOf(".") if (AtPos == -1 || StopPos == -1) { alert("Please Enter Valid Email Address"); document.getElementById('to_email').focus(); return false; } email = document.getElementById('cc_email').value; if(email.length != 0){ var AtPos = email.indexOf("@") var StopPos = email.lastIndexOf(".") if (AtPos == -1 || StopPos == -1) { alert("Please Enter Valid Email Address"); document.getElementById('cc_email').focus(); return false; } } var answer = confirm ("Send E-Mail?"); if (!answer){ return false; } } function success(){ alert('E-Mail Sent Successfully'); window.close(); } I even get the alert mentioning "E-Mail Sent Successfully". But simply the window is not closed. Can you guys please shed me some light on this.... Your help is greatly appreciated Ohh and by the way I'm running FF8. Cheers E
  5. Hello guys, I am running in to some issues where users trigger another even before an ajax procedure is completed. Eg after a button click (where ajax is doing some magic), the user clicks on another button (which will do some more magic) before the first buttons process is completed. I have seen some sites doing some sort of of lightbox technique which in this case shows a the moving bar or the rotating circle thingi. Are they using the lightbox method or is there any other easy way? Cheers Elabuwa
  6. it was a problem in JS after all. was looking for elements that never existed. Problem solved.
  7. Hi guys, Been stuck for a few days with this scenario. Any help? The alert box appears on an error. But the submitting won't stop. The details are submitted and the form is processed. Any help is greatly appreciated... <html> <head> <script type="text/javascript" src="email_helper/jscripts/tiny_mce/tiny_mce.js"></script> <script type="text/javascript"> tinyMCE.init({ // General options mode : "textareas", theme : "simple" }); </script> <script language="javascript"> function MM_openBrWindow(theURL,winName,features) { window.open(theURL,winName,features); } function err_check(){ var email = document.getElementById('to_email').value; if(email.length==0){ alert('Please Enter Email Address'); return false; } var AtPos = email.indexOf("@") var StopPos = email.lastIndexOf(".") if (AtPos == -1 || StopPos == -1) { alert("Please Enter Valid Email Address"); document.getElementById('email').focus(); return false; } email = document.getElementById('cc_email').value; if(email.length != 0){ var AtPos = email.indexOf("@") var StopPos = email.lastIndexOf(".") if (AtPos == -1 || StopPos == -1) { alert("Please Enter Valid Email Address"); document.getElementById('email').focus(); return false; } } var answer = confirm ("Send E-Mail?"); if (!answer){ return false; } } </script> <!-- /TinyMCE --> <style type="text/css"> body, table, td, th{ background-color:#CCCCCC; font-family: Arial; font-size:14px; } .que{ font-weight:bold; } </style> </head> <body> <form method="post" enctype="multipart/form-data"> <?php include 'library/database.php'; include 'library/opendb.php'; $query = mysql_query("SELECT email,contact,mobile FROM users WHERE user_id='$uid'") or die(mysql_error()); $row = mysql_fetch_row($query); $from_email = $row[0]; $from_person = $row[1]; $from_mobile = $row[2]; $query = mysql_query("SELECT customer_id FROM campaign_summary WHERE camp_id='$camp_id'") or die(mysql_error()); $row = mysql_fetch_row($query); $cusid = $row[0]; $query = mysql_query("SELECT email FROM client_info WHERE comp_id='$cusid'") or die(mysql_error()); $row = mysql_fetch_row($query); $toer = $row[0]; include 'library/closedb.php'; ?> <table width="100%" border="0"> <tr><td rowspan="4"><input type="submit" name="send_email" id="send_email" style="height:50px; width:100px;" value="SEND" onClick="return err_check();" /></td><td><span class="que">From : </span></td><td colspan="3"><?php echo $from_email; ?><input type="hidden" name="from_mail" id="from_mail" /><input type="hidden" name="camp_id" id="camp_id" value="<?php echo $camp_id;?>"/></td></tr> <tr><td><span class="que">To : </span></td><td colspan="3"><input name="to_email" id="to_email" style="width:250px;" value="<?php echo $toer;?>"/></td></tr> <tr><td><span class="que">CC : </span></td><td colspan="3"><input name="cc_email" id="cc_email" style="width:250px;"/></td></tr> <tr><td><span class="que">Subject : </span></td><td colspan="3"><input style="width:300px;" name="subject" id="subject" /></td></tr> <tr><td rowspan="1" colspan="2"> </td><td><input type="checkbox" name="ori_pdf" id="ori_pdf" checked /> PDF Quotation</td><td> </td><td> </td></tr><tr><td colspan="2"><span class="que">Credit Application</span></td><td><input type="checkbox" name="corporate" id="corporate"/>Corporate</td><td><input type="checkbox" name="individual" id="individual" />Individual</td><td><input type="checkbox" name="cash" id="cash" />Cash Account</td> </tr> <tr> <td colspan="2" rowspan="3"></td><td><input type="checkbox" name="tabloid" id="tabloid" />Tabloid Example</td> <td><input type="checkbox" name="broadsheet" id="broadsheet" />Broadsheet Example</td></tr> <tr><td><input type="checkbox" name="colmt" id="colmt" />Column Sizes Tabloid</td> <td><input type="checkbox" name="colmb" id="colmb" />Column Sizes Broadsheet</td></tr> <tr><td><input type="checkbox" name="maps" id="maps" />Maps / Distribution</td><td colspan="2" align="right">External Attachments <input id="upload_file" name="upload_file" type="file"/> </td></tr> <tr><td colspan="2"><span class="que">Message :</span></td><td colspan="3"> <textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 100%"> <?php echo "<br><br><br>" . $from_person . "<br>" . $from_mobile; ?> </textarea> </td></tr> </table> </form> </body> </html>
  8. Hello guys, Can some one shed some light on why the below query is returning the wrong results. :'( :'( SELECT campaign_details.pid,campaign_summary.uid,campaign_summary.customer_id FROM campaign_summary,campaign_details WHERE campaign_summary.camp_id=campaign_details.camp_id AND campaign_summary.uid='1' OR campaign_summary.uid='11' AND [b]campaign_summary.customer_id='205'[/b] AND [b]campaign_details.pid='7'[/b] GROUP BY campaign_details.pid I am explicitly telling stupid sql to return only where the campaign_details.pid matches with 7 and campaign_summary.customer_id matches with 205. But I get the below result set. pid----uid---customer_id 1------1-----65 2------1-----84 4------1-----81 5------1-----63 7------1-----65 13-----1-----63 Why is it returning PID's other than 7? Why is it returning customer_id's other than 205? There should be no results at all. Can someone please shed some light? Mysql server v5.0.51 Any help is greatly appreciated
  9. Hi guys, My brain is not working. May be I need a coffee break. I need your expertise. Below is the code holding the textarea. Look for the element with the id : themessage <table width="100%" border="0"> <tr><td rowspan="4"><input type="button" name="send_email" id="send_email" style="height:50px; width:100px;" value="SEND" onClick="return err_check();" /></td><td><span class="que">From : </span></td><td colspan="3"><?php echo $from_email; ?><input type="hidden" name="from_mail" id="from_mail" value="<?php echo $from_email;?>"/><input type="hidden" name="camp_id" id="camp_id" value="<?php echo $camp_id;?>"/></td></tr> <tr><td><span class="que">To : </span></td><td colspan="3"><input name="to_email" id="to_email" style="width:250px;" /></td></tr> <tr><td><span class="que">CC : </span></td><td colspan="3"><input name="cc_email" id="cc_email" style="width:250px;"/></td></tr> <tr><td><span class="que">Subject : </span></td><td colspan="3"><input style="width:300px;" name="subject" id="subject" /></td></tr> <tr><td rowspan="1" colspan="2"> </td><td><input type="checkbox" name="ori_pdf" id="ori_pdf" /> PDF Quotation</td><td> </td><td> </td></tr><tr><td colspan="2"><span class="que">Credit Application</span></td><td><input type="checkbox" name="corporate" id="corporate"/>Corporate</td><td><input type="checkbox" name="individual" id="individual" />Individual</td><td><input type="checkbox" name="cash" id="cash" />Cash Account</td> </tr> <tr> <td colspan="2" rowspan="3"></td><td><input type="checkbox" name="tabloid" id="tabloid" />Tabloid Example</td> <td><input type="checkbox" name="broadsheet" id="broadsheet" />Broadsheet Example</td></tr> <tr><td><input type="checkbox" name="colmt" id="colmt" />Column Sizes Tabloid</td> <td><input type="checkbox" name="colmb" id="colmb" />Column Sizes Broadsheet</td></tr> <tr><td><input type="checkbox" name="maps" id="maps" />Maps / Distribution</td><td colspan="2" align="right">External Attachments <input id="upload_file" name="upload_file" type="file"/> </td></tr> <tr><td colspan="2"><span class="que">Message :</span></td><td colspan="3"> <textarea id="themessage" name="themessage" rows="15" cols="80" style="width: 100%"> </textarea> </td></tr> </table> Now on a button click, I'm trying to pass some values which one of them happens to be what ever that is entered in the textarea. For some reason, the stupid JS is not reading. But I think it is me that is stupid, not JS. Below is the code i'm running to get the value. var message = document.getElementById('themessage').value; alert(message); The alert simply returns blank. There is an alert, but no value even where there is text in the text area. Can someone please shed some light on this. pretty please
  10. Hi guys, DB is mysql. I have the below query i'm trying to run through PHP. $sql = "SELECT DISTINCT pid FROM campaign_details WHERE camp_id='$camp_id' LIMIT 7"; $newquery = mysql_query($sql) or die(mysql_error()); There are 10 ditinct PID values but I want only 7. The stupid thing returns all of them when I need to limit them at 7. Any work around this? Or Do I need to go and take a coffee break and have another look? haha. Cheers
  11. Sorry guys. Apparently the stupid SQL query had a issue. It is sorted. By the way I found that {$var_name} should echo it as well.
  12. Hi guys, I'm using this EOD thingi in order to print a table and get it PDF. I am using TCPDF and following their examples to get the PDF output. I need to print a php variable's value within the EOD. Can you please help me out. Below is the piece of code I'm running. $tbl = <<<EOD <table cellspacing="0" cellpadding="1" border="1"> <tr> <td rowspan="4"><img src="images/m24.jpg"></td> <td align="right" width="150">From the desk of</td> <td>: $contat</td> </tr> <tr> <td align="right">E-Mail</td> <td>: $email</td> </tr> <tr> <td align="right">Telephone</td> <td>: $telephone</td> </tr> <tr> <td align="right">Mobile</td> <td>: $mobile</td> </tr> </table> EOD; the $variables are simply ignored. or even if I echo, there is no PHP value. Can you guys please shed some light on this issue. Pretty pleeeaaassseee
  13. Hi guys, When I run the below query it works when I use a number for the "account" like part, but if I run a letter like "a" or "A" it returns no results. Works SELECT company,contact,booking_id,date_created,camp_id FROM campaign_summary WHERE uid='1' AND account LIKE '5%' AND type='P' Does NOT work SELECT company,contact,booking_id,date_created,camp_id FROM campaign_summary WHERE uid='1' AND account LIKE 'a%' AND type='P' Any idea? :wtf: FYI, the table has records where the account field has records begining from "a". Field is VARCHAR
  14. Hi guys, Have a table with a field storing values in DATETIME. Say the below records. Date 2011-11-09 08:07:32 2011-11-08 08:41:04 2011-11-01 08:51:53 2011-11-02 08:52:19 2011-11-05 08:52:56 2011-11-04 08:53:09 2011-11-08 08:53:29 2011-11-08 08:53:59 How would I write my sql statement if I need to get the records where only the date matches. Time does not need to be matched. As long as the date is matched I'm happy. I tried writing SELECT * FROM TABLE WHERE date='2011-11-08' but no success. Probably overlooking something. Your help is greatly appreciated. Cheers Elabuwa
×
×
  • 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.