|
hello,
i don't know much about php, but you might want to google sending email using php, and see if that helps you
|
|
|
|
|
u may use this as we send sms we will send email
private void SendMessage(string p_sPhoneNumber, string p_sMessage, string p_sUsername, string p_sPasskey) {
SMSService.SMSMessagingprocessService smsService = new SMSService.SMSMessagingprocessService();
string sCountryCodes;
try {
if (smsService.ValidPhoneNumber(p_sPhoneNumber)) {
bool result = smsService.SendMessage(p_sPhoneNumber, p_sMessage, p_sUsername, p_sPasskey);
if ((result == true)) {
MsgBox("The message was sent", MsgBoxStyle.Information, "SMS Messaging");
}
else {
MsgBox("The message could not be sent", MsgBoxStyle.Information, "SMS Messaging");
}
}
}
catch (SoapException ex) {
MsgBox(("An exception occured. " + ex.Detail.InnerText), MsgBoxStyle.Critical, "SMS Messaging");
}
}
SmsMessage sm= new SmsMessage("destination phone number","messagetext");
sm.RequestDeliveryReport = true;
sm.Send();
|
|
|
|
|
Hello,
(This post exists in ASP.NET forum as well, reposting here because I need to solve this issue asap, also coz I did not get any response there)
I'm doing bit of fire fighting here on an old piece of code written by someone else. Its an application in Arabic.
In the application currency is formatted using VisualBasic functions and string formatting. Example:
FormatCurrency(amount, 3)
This is how currency is displayed now: 123،34.342 ر.ع
But they want it to displayed with different group separator and decimal separator, like 123,34/342 ر.ع
I have created a function like this:
Private Sub SetCulture(ByVal culture As String, ByVal useUserOverride As Boolean) Dim cultureToUse As New System.Globalization.CultureInfo(culture, useUserOverride) cultureToUse.NumberFormat.CurrencyDecimalDigits = 3 cultureToUse.NumberFormat.CurrencyDecimalSeparator = "/" cultureToUse.NumberFormat.CurrencyGroupSeparator = "," cultureToUse.NumberFormat.CurrencySymbol = "ر.ع." Threading.Thread.CurrentThread.CurrentUICulture = cultureToUse Threading.Thread.CurrentThread.CurrentCulture = cultureToUse End Sub
I call this function like
Me.SetCulture("ar-OM", False)
But Currency group separator is still the old one. The regional settings of server where I'm testing this app is set to English. I tried with English and Arabic(Oman) in my local PC regional settings, currency is displayed the way I want only if I set English settings. But here in Oman, people mostly set their Windows for Arabic language. Could someone point out what I'm doing wrong here?
Regards,
Blumen
|
|
|
|
|
This might be a long shot, but it could depend on where/how the data is stored. The currencyformat might be set already in the query.
modified on Saturday, August 16, 2008 4:54 PM
|
|
|
|
|
Hi,
Currency value is not queried from a DB, its calculated based on the values entered by the user in the web form.
Regards,
Blumen
|
|
|
|
|
Hi.
I want to type into a HTML text box so that after each character is entered, a JavaScript function will raise the character to upper case and after doing so the cursor position will remain after the character entered ready for the next character, if that makes sense, just the same as typing say into a Word document, but each time a letter is entered it is immediately upper cased. Problem with my code is that after the .toUpperCase() method the cursor leapes over to the end of the line, which is unsatisfactory. I don't want to use the onblur event to do the job instead the change needs to be dynamic as I type. For example text contains "FRED SMITH", I want to the position cursor in the space and enter in a middle name, which may be typed in lowercase, but end up with: "FRED MICHAEL SMITH". Any ideas please?
<pre>
<html></head>
<body>
<input id='txt1' value='FRED SMITH' onkeyup='txt1_onkeyup()'>
</body>
</html>
<script language='javascript'>
function txt1_onkeyup()
{
if(
event.keyCode == 35 ||
event.keyCode == 36 ||
event.keyCode == 37 ||
event.keyCode == 39
) // ignore cursor keys.
{return;}
else
{
if (event.keyCode != 8)
{
var o=document.all;
o.txt1.value = o.txt1.value.toUpperCase();
}
}
}
</script>
</pre>
|
|
|
|
|
I don't think there is a way to set the cursor position in a text field by using JavaScript. You may be able to do it using IE specific calls, and I'm not sure these are even still valid.
http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130[^]
Oh, and dont use
var o = document.all;
document all is not supported by all browsers, and is going to really pig up your application (and irritate the users as much as forcing CAPS does - cant you handle the uppercase on the server side and save yourself the irritation ?).
just use something like this.
var o = document.getElementById('txt1');
o.value = o.value.toUpperCase();
o = null;
|
|
|
|
|
I believe that document.all is only supported in IE
Regards,
-- Perspx
"The Blue Screen of Death, also known as The Blue Screen of Doom, the "Blue Screen of Fun", "Phatul Exception: The WRECKening" and "Windows Vista", is a multi award-winning game first developed in 1995 by Microsoft" - Uncyclopedia
Introduction to Object-Oriented JavaScript
|
|
|
|
|
Hi.
Re. document.all I am working on a large company intranet system, we only use IE.
In this particular case, the requirement is to raise the case when typing and not on the onblur event or server-side.
Anyway I managed to find a solution myself by using a style, ie:
.text1
{
text-transform: uppercase;
}
Which works perfectly.
Thanks.
|
|
|
|
|
Hi Mates,
I am developing a job portal(.Net). Currently I am working on search engine.I want to know that how i can develope a web service which omit job openings from other web portals on the basis of search criteria given by me.
Thanks.
Hemant Thaker
By:
Hemant Thaker
|
|
|
|
|
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
I've found a way to keep custom types working smoothly through web services, and I'd like to know what others think. Maybe this is already obvious common practise... if so, please let me know -- it'd be reassuring. Also: please criticize
1. An assembly "Domain" containing:
class DomainObject { }
interface IDomainProvider
{
void Post(DomainObject do);
DomainObject[] Query(string query);
}
abstract class DomainProvider : ProviderBase, IDomainProvider { ... }
class StubDomainProvider { ... }
2. An assembly "Domain.WebServices" with app.config specifying StubDomainProvider as the default provider:
class DomainWebService : WebService, IDomainProvider { ... }
3. Back in the "Domain" assembly, a web reference to DomainWebService. Since DomainObject uses xml serialization attributes, its schema is nicely preserved: the web reference automatically generates its own DomainWebService.DomainObject class.
4. In the original DomainObject class,
public static explicit operator DomainWebService.DomainObject (DomainObject obj)
{
}
public static explicit operator DomainWebService.DomainObject(DomainObject obj)
{
}
5. Finally, still in the "Domain" assembly,
public WSDomainProvider : DomainProvider { ... }
Pros:
* WSDomainProvider is easy to implement.
Cons:
* DomainObject has to use xml serialization attributes, not IXmlSerializable.
Does any part of this get your spidey-sense tingling? Does it seem like a bad idea in any way?
Web Development seemed like the right forum ... but would another have been more appropriate?
|
|
|
|
|
Yellowseed wrote: Web Development seemed like the right forum ... but would another have been more appropriate?
Near as i can tell, this is all .NET-specific code, with precious little "Web" to it beyond the "Web Services" target. I suggest ASP.NET[^], C#[^], or .NET Framework[^].
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
Thanks! I copied the first post to C#[^].
|
|
|
|
|
Hi guys,
I am writing a webshop site. On one page, I have a list of all the products with a input element for each product where the user can enter the quantity ordered.
There us an input with a submit type, that redirects to a shopping list. In that php file, I take the number for each of these input fields from a $_POST array and set the quantity ordered in a $_SESSION array. On the products page, I use the $_SESSION array to set the value ordered back to the last entry. All this works as expected. However, the pages also include a menu that enables the user to navigate away from the products page. When this happens, there obviously is no POST, and the numbers entered in the inputs, is not stored anywhere, so that the user - upon returning to the products page - will find his quantity inputs have been lost.
Does anyone have a way around this problem? It should be possible. If I look at Google for example: when I have entered a search phrase and that use the "back" button and the "foreward" button again, I return to the google search page with my previously entered search phrase still in place!!
I would appreciate any comments.
Thanks in advance,
William
|
|
|
|
|
Well, I thinks there are three ways for this question .
Using $_SESSION : I think this isn't good way
Using $_POST
Using $_Get : I think this is the best way
For PHP questions you can ask them here[^]
|
|
|
|
|
Hi all,
I want to retrieve a tag by using id from a external html. How can I go about doing it?
Also, how to count the number of tag, like div tag, table tag from a external html?
I can't find any tutorial, help or code sample from googling.
Thanks & regards,
|
|
|
|
|
Please make me little more clear...
|
|
|
|
|
These methods demonstrate the actions you describe, as i understand them. I wouldn't use these as-is, but hopefully they'll give you a reference for your own code:
function GetElementByIdFromHtml(html, id)
{
var subDom = document.createElement("DIV");
subDom.innerHTML = html;
var elements = subDom.getElementsByTagName("*");
for (var i=elements.length-1; i>=0; --i)
{
if ( elements[i].id == id )
return elements[i];
}
return null;
}
function CountElementsInHtml(html, tagName)
{
var subDom = document.createElement("DIV");
subDom.innerHTML = html;
var elems = subDom.getElementsByTagName(tagName);
return elems.length;
}
var theHtml = "<html><body><div>blah blah</div><div id='something'>bleack</div></body></html>";
var somethingEl = GetElementByIdFromHtml(theHtml, 'something');
var numDivs = CountElementsInHtml(theHtml, 'DIV');
Citizen 20.1.01 'The question is,' said Humpty Dumpty, 'which is to be master - that's all.'
|
|
|
|
|
document.createElement
I never thought of that, thanks!!
|
|
|
|
|
hi all,
i have a Multiple entry page in which the rows of a table will be added dynamically using javascrpit. when i added new rows, it will added at the bottom the table, ie as last row. but when i added more than 20 / 30 rows, i cannot see the last entered data without scrolling. so i want to add this new row as first row in the table. how can i achieve this. i used following code to add rows dynamically:
var parentObj = document.getElementById('Table1');
var row = document.createElement("tr");
var cellA= document.createElement("td");
var cellB= document.createElement("td");
var cellC= document.createElement("td");
row.appendChild(cellA);
row.appendChild(cellB);
row.appendChild(cellC);
parentObj.appendChild(row);
Please help to sort out this..
|
|
|
|
|
dont, pick one place or another to add rows, the user will get used to seeing the rows added to the bottom and wont check the top when they add the 31st row and will therefore think it didnt get added. if there is no "insert" function, you will probably have to read in all the elements, clear them, then write yours first then readd everything else. or use somethting that runs server side, like a datagrid or listview, or a dozen other options. if you dotn want to see a postback use AJAX or something ajax like.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
unfortunately , i cannot use Server-side controls bcose , the user will enter more than 50 records at a time, and its not so safe to use ajax bcose the network is too low... Plz suggest ...
|
|
|
|
|
if you arent using server side code what are you doing with the rows once they are added? i've used ajax and it runs fairly quickly if you do it right, you just have to be more careful with how you write the server code because poorly written code runs slower and with ajax people are more likely to notice.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hi all,
I am writing a webshop. In the header of the "products" page, I have the following:
<pre>
session_start ();
include "php/init.php";
In the init.php, I fill a numer of session variables with product information like:
if (!isset ($_SESSION['products']))
{
$_SESSION['products'][ 0]['id'] = '1';
$_SESSION['products'][ 0]['name'] = 'Castle Lager';
$_SESSION['products'][ 0]['number'] = 0;
$_SESSION['products'][ 0]['price'] = 1.25;
$_SESSION['products'][ 0]['disp'] = '1,25';
$_SESSION['products'][ 0]['VAT'] = 2;
$_SESSION['products'][ 1]['id'] = '2';
$_SESSION['products'][ 1]['name'] = 'Hunters Dry';
$_SESSION['products'][ 1]['number'] = 0;
$_SESSION['products'][ 1]['price'] = 1.70;
$_SESSION['products'][ 1]['disp'] = '1,70';
$_SESSION['products'][ 1]['VAT'] = 2;
etc...
and in the Products.php page, I use these variabes to fill a product list:
foreach ($_SESSION['products'] as $item)
{
etc....
}
</pre>
The reason that I am filling all the individual items is that I have a PC program that maintains all this information, and automatically generates the init.php file on the server.
My issue is that when I first start the page, everything works just fine. However, when I do a refresh of the page, I get the error message "Invalid argument supplied for foreach". If I test if the $_SESSION['products'] has been set, then it says that is has been set, however, if I test for "is_array ($_SESSION['products'])" then it returns false.
Any ideas on how this can have happened would be greatly appreciated!!!
Regards,
William
|
|
|
|
|