I think it's just a syntax problem... It's been a while since I coded in PHP, but this should work:
echo '<a href="'.$info['link'].'">.'$info['description'].'</a>';
I think it's just a syntax problem... It's been a while since I coded in PHP, but this should work:
echo '<a href="'.$info['link'].'">.'$info['description'].'</a>';
Hello,
I'd made it something like this:
function initializeSelect(selectId, divQuantityId){
var
select = document.getElementById(selectId), // gets the select element
divQuantity = document.getElementById(divQuantityId); // gets the div element
for(var i = 0; i <=20; i++) {
// create the option
var option = document.createElement('option');
option.innerHTML = i;
option.value = i;
// append the option
select.appendChild(addOption);
}
// sets the onChange event to the select
select.onchange = function() {
divQuantity.innerHTML = select.value; // display the selected value on the div
};
}
And then use the function like this:
initializeSelect('product1', 'quantity1');
initializeSelect('product2', 'quantity2');
// initialize NetOffice, must be called 1 times in your application before use
LateBindingApi.Core.Factory.Initialize();
// open word and an existing document
Word.Application wordApplication = new Word.Application();
Word.Document newDocument = wordApplication.Documents.Open(@"C:\myWordFile.doc");
// read text of document
string plainContent = newDocument.Content.Text;
// close word and dispose reference
wordApplication.Quit();
wordApplication.Dispose();
Please, don't be lazy and please search in the site that I posted.
EvolutionFallen,
Buttons can have html content.$("#myButton").html("<b>Button Text</b>");
is a valid command and the text will be in bold.
Assuming that $j(idtext, window.parent.document)
is the right selector of your button:
$j(idtext, window.parent.document).click();
should work.
Hi, I'm having trouble to filter a Customer Set by the date of his first buy(First Activity).
I've tried this two ways:
Returns all customers, even with FirstActivity Null
SELECT {
[Measures].[Valor Item],
[Measures].[First Activity]
} ON 0,
{
Filter(
{ [CLIENTE].[Cliente].[Cliente].Members },
( [Measures].[First Activity], [Time].[Year].&[2012-01-01T00:00:00] ).Count > 2
)
} ON 1
FROM
[SCA]
Return customers that FirstActivity is not null but is outside the Year specified(In this case 2012).
SELECT {
[Measures].[Valor Item],
[Measures].[First Activity]
} ON 0,
{
NonEmpty(
{ [CLIENTE].[Cliente].[Cliente].Members },
( [Measures].[First Activity], [Time].[Year].&[2012-01-01T00:00:00] )
)
} ON 1
FROM
[SCA]
Any help is appreciated.
Thanks.
Just show them a very sofisticated website, like DaniWeb or Google or Facebook, and ask: How would you make this happen? Do you know any good templates for creating something like it?
Proglearner, W3Schools is a really nice place to start learning about web. I started there about 6 years ago.
But let's go to the point... Knowing how to code is the only way to do exactly what you/your client wants.
There's a lot of tools, open-source projects, frameworks that you can use to build a website very fast, maybe in a day or two. But all those tools are limited and are going to limit your project.
If you just have good ideas for design/layout but don't know how to code, you'll always be limited by the available tools that you know how to use.
knowing how to code is to be free to create, don't matter if there's something identical out there or if it is all from your head.
Are you thinking that someone will write that code for you? Guess again.
You can't remove only the X button you have to remove the control box, like this:
this.ControlBox = false
Chrome as a built in developers tools, just press ctrl+shift+I.
Try this: document.editrecord.submit();
You can do it like this also:
string[][] array = new string[3][];
array[0] = new string[4];
array[0][0]; = "a";
array[0][1] = "b"
Does it throw any errors?
How did you implement the counter? Are you handling the IP?
Try this way:
<a class='ovalbutton' href='javascript: document.forms["editrecord"].submit();'><span>Update</span></a>
The syntax for creating such an array can be like this:
string[,] array2d = new string[,] {
{"a1", "b1", "c1", "d1"},
{"a2", "b2", "c2", "d2"},
{"a3", "b3", "c3", "d3"}
};
Take a look at those posts for better understanding:
http://msdn.microsoft.com/en-us/library/aa288453(v=vs.71).aspx
Sorry, but I don't really use VB. But the logic should be enough, shouldn't it?
Instead of using removeAttr, try using this.checked = ""
I don't know how to set the values for browser specific css styles.
But take a look at this library: http://rekapi.com/
It may be what you need.
Coding KeyFrames manually for each browser would be a big headache, if you can use something that is ready, use it.
Hope it helps.
The second code block could be something like this:
Function AddLevels(ComboBox combo) As Void
With combo
.AddItem ("")
.AddItem ("Level 4")
.AddItem ("Level 5")
.AddItem ("Level 6")
.AddItem ("Level 7")
.AddItem ("Lost")
End With
End Function
AddLevels(ComboBox21)
AddLevels(ComboBox22)
...
Obs.: I don't know if the Class name is really ComboBox, you need to verify it
The first could be something like this:
Dim Row As String
Dim Column1 As String
Dim Column2 As String
If Range("D8") = "EBU 2" Then
Row = "9"
ElseIf Range("D8") = "EBU 5" Then
Row = "10"
ElseIf Range("D8") = "EBU 7" Then
Row = "11"
... ' Finish Else Ifs
End If
If ComboBox1.Text = "Level 4" Then
Column1 = "C"
Column2 = "D"
ElseIf ComboBox1.Text = "Level 5" Then
Column1 = "E"
Column2 = "F"
ElseIf ComboBox1.Text = "Level 6" Then
Column1 = "G"
Column2 = "H"
ElseIf ComboBox1.Text = "Level 7" Then
Column1 = "I"
Column2 = "J"
ElseIf ComboBox1.Text = "Lost" Then
Column1 = "K"
Column2 = "L"
End If
Sheets("Main").Range(Column1 & Row) = Sheets("Main").Range(Column1 & Row) + 1
Sheets("Main").Range(Column2 & Row) = Sheets("Main").Range(Column2 & Row) + Range("K8")
You can create base class, like Model, that has the Caption property, and the Person class would extend the Model class, this way it would inherit the property. And every other class that extends Model would also have the Caption property.
What's the problem with your code? What's not working? Which erros does it throw? What can't you figure out?
Boolean is true of false, right? So normally it's used exactly to get/set if a "thing" Can or Can't be done, if it Is or if it isn't and if it Has or Hasn't something.
Examples:
this.HasChildren
this.IsVisible
this.CanUpdate or this.IsUpdatable
I'd make the <label> have the same height and line-height of the input, and use margin to create the space between them.
Try this.checked = "checked";
Ok, so let me tell you, you can't add JS inside Flex, but ActionScript can communicate with JavaScript.
So, you can either make the JS call functions inside the Flex App to set/change the menu or you can make the Flex App call functions in JavaScript, if you are using an HTML menu.
To make this communication you need to use the Flex ExternalInterface class and also set the correct parameters in the embeded flash object in your html markup.
I don't know the fields and tables of your DB, but the point is that you can make an insert from a select. Did you get that?
Check those lins:
http://dev.mysql.com/doc/refman/5.1/en/insert-select.html
http://stackoverflow.com/questions/5391344/mysql-insert-with-select
This select return 0 rows?
SELECT
NULL, id_product, 0, id_supplier, supplier_reference, wholesale_price , 3
FROM
ps_product
If so, it means that there's no rows in your table.
Are you talking about Adobe Flex? If so, how are you creating your app? Just one project that will be entire app or will you have a couple of PHP pages and each one with a different Flex app?
Sure you can, but I don't know how Dropbox works.
All you need is to put your file in a virtual directory, using IIS, apache or any other.
Do you have any host? If so just put the file there and use it's URL.
Nathaniel10,
even thru innerHTML is not an W3C standad, almost every modern browser implement it.
Take a look at this http://www.quirksmode.org/dom/w3c_html.html
And if you really doesn't want to use it, use Object.style.textAlign
to set the alignment.
You are getting the X and Y values as strings, so insted of adding it's concatenating.
Ie.: '7' + 10 = 710
Update those two lines:
var rx= parseInt( document.getElementById('rx').value );
var ry= parseInt( document.getElementById('ry').value );
You just posted your code, please give more info so we can help. What's the problem with your code? What were the result it gave you? What's the result you want to achive? What things did you try?
Something like this:
DELETE FROM my_table WHERE col1 IS NULL AND col2 IS NULL AND col3 IS NULL AND col4 IS NULL
Try like this and see if it works or if it writes the exception on Log.txt.
Also, make sure that the folder MemberPicture exists on the server.
namespace Pic
{
public partial class ImageConversions : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
clsAction action = new clsAction();
DateTime thisDay = DateTime.Now;
string time = thisDay.ToString("yyyyMMMd HHmmss");
string imgMember = time + ".jpg";
string fName="MemberPicture/";
string imgPath = Path.Combine(fName,imgMember);
try
{
txtAcc.Text = Session["Cust"].ToString();
lblGeoID.Text = Session["geoID"].ToString();
lblMember.Text = Session["Member"].ToString();
int memberGeoID = Convert.ToInt32(lblGeoID.Text);
CreatePhoto(imgPath);
action.ExecuteInsert(imgMember, imgPath, txtAcc.Text, memberGeoID, lblMember.Text);
lblMsg.Text = "Success";
}
catch (Exception ex)
{
LogException(ex);
}
}
protected void CreatePhoto(string imgPath)
{
try
{
string strPhoto = Request.Form["imageData"]; //Get the image from flash file
byte[] photo = Convert.FromBase64String(strPhoto);
string fileName = Path.Combine(fName,imgPath);
using (var fs = new FileStream(imgPath, FileMode.OpenOrCreate, FileAccess.Write))
{
// read the file
BinaryWriter br = new BinaryWriter(fs);
br.Write(photo);
br.Flush();
br.Close();
fs.Close();
}
}
catch (Exception ex)
{
LogException(ex);
}
}
protected void LogException(Exception ex)
{
using (System.IO.StreamWriter file = new System.IO.StreamWriter(Server.MapPath("~/Log.txt"), true))
{
file.WriteLine(DateTime.Now.ToString("dd-MM-yyyy HH:mm:ss tt") + " " + "Line No:" + ex.Source + " Message " + ex.Message);
file.WriteLine(" ");
file.WriteLine(DateTime.Now.ToString("dd-MM-yyyy HH:mm:ss tt") + " " + ex.StackTrace);
file.WriteLine(" ");
file.WriteLine(" ");
}
}
}
}
Does it throw any errors?
First test only the select part and see if it returns any rows.
Yes, you could do it with PHP. You'd have to make a select on the rows you want to insert, then loop thru them and insert each record.
Welcome Robert!
Enjoy your stay and I'm sure we will =)
Hello fellas,
I've been participating in Daniweb for quite a while now, but I realize that I never introduced myself, so let's do it ^^
I'm 23 yo, from Brazil. Started into development playing Ultima Online when I was about 15yo. I became a enthusiast in programming, moved to HTML, CSS, JS and ASP. Sometime later started with SQL Server, Adobe Flex and C#.Net.
At this point I can say that I know a lot of some programing languages/technologies and I know a little bit about many others.
I started two colleges but never graduated.
Today I work in a small company, primary with BI, ATM's and Android. But what I most enjoy developing is JavaScript. And I'm also trying to start a carrer as a model, that's where the photo came from ^^.
I've been enjoying very much the forum, there's a lot of very nice and smart people here.
I just wish some people would search a little more beforing making some very basic questions, that they would find out in 10 seconds on google.
So, that's a little about me.
Seeya.
What do you mean how much? You can use as many master pages as you see fit. You can nested master pages as well.
So you'll need a simple query just ordering the results by the stock number. Then when displaying the results you'll have to check if the previous record has the same stock number, if it has don't display it, if it's different, then display it.
The basic ways are:
With jQUery: $("#buttonID).click();
Only JS: document.getElementById('buttonID').onclick();
If you want to learn more and do a nice implementation read this article:
http://jehiah.cz/a/firing-javascript-events-properly
I think that the only thing you need is to order the select by stockNumber. Group is used when you want to make an calculation on the values, like SUM or AVG, but it doensn't seem that is what you want.
Do you want to tranform the query result in an object oriented array? Something like the Stock object has an array of Storages? Is that it?
**Were you able to log the exceptions? **
When the catch() occurs save the message details into a txt file and post it back here.
persianprez,
the order of the script does make difference, if you don't use events to run it. If the script is run before the DOM is created then the elements doesn't exists yet, therefore the method getElementsByClassName() won't find any elements.
What this script does is:
Select the specified columns from ps_products, and insert each returned row into ps_product_suplier.
The table ps_product will not be changed.
My question is Why do want this? Can't you just store the user preferences in the Settings file, Registry or a config file like any other program do?
What's the point of generating a new .exe?
Use a select from the ps_product table to insert into ps_product_supplier. Something like this:
INSERT INTO ps_product_supplier
(id_product_supplier, id_product, id_product_attribute, id_supplier, product_supplier_reference, product_supplier_price_te, id_currency)
SELECT
NULL, id_product, 0, id_supplier, supplier_reference, wholesale_price , 3
FROM
ps_product