Archive

Posts Tagged ‘elem’

Flash Elem. Imitating Text Box

November 26th, 2009 Comments off

_Extensive_ programming skills in flash required.

For a project I need a Flash element which basically can imitate a HTML text box element for text only inputs.

It has to be resizable by modifying the width and height properties of the embedded element. Furthermore I want to be able to define font color, font size, font family and background color (even transparency) over external properties. Somehow I should be able to read the text tipped in from a JavaScript environment.

Since I want to be able to edit existing text (like with normal text box elements) I should be able to write text into that Flash element from my JavaScript environment.

Last but not least, I should be able to use the same element several times independently on the same page.

Certainly sounds like a challenge and work for a skilled programmer.

Little Fixes

August 12th, 2009 Comments off

We need some little modifications on a menu programmer made, its done very complicated, but not not all pages work with the menu.

its for oscommerce shop, also the logo needs to be linked to the index.php

The menu is this :

[code]<script type="text/javascript">
function load()
{
var LINK = window.location.pathname;
if (LINK == "/laminaat.php")
{
var elem = document.getElementById('Background2');
elem.style.visibility = "visible";
}
if (LINK == "/" || LINK == "/index.php")
{
var elem = document.getElementById('Background');
elem.style.visibility = "visible";
}
if (LINK == "/digitaal.php")
{
var elem = document.getElementById('Background1');
elem.style.visibility = "visible";
}
if (LINK == "/tapijt.php")
{
var elem = document.getElementById('Background3');
elem.style.visibility = "visible";
}
if (LINK == "/informatie.php")
{
var elem = document.getElementById('Background4');
elem.style.visibility = "visible";
}
if (LINK == "shipping.php" || LINK == "bestelprocedure.php")
{
var elem = document.getElementById('Background4');
elem.style.visibility = "visible";
}
}
</script>
[/code]

and this as tabmenu:
[code]
<div onreadystatechange="load();" class="FIRST" id="Background">
<div id="LINK">behang</div>
<div id="LINK"><a href="digitaal.php">   digitaal</a></div>
<div id="LINK"><a href="laminaat.php">   laminaat</a></div>
<div id="LINK"><a href="tapijt.php">   tapijt</a></div>
<div id="LINK"><a href="informatie.php?info_id=1">     informatie</a></div>
</div>
<div class="SECOND" id="Background1">
<div id="LINK"><a href="/">behang</a></div>
<div id="LINK">   digitaal</div>
<div id="LINK"><a href="laminaat.php">   laminaat</a></div>
<div id="LINK"><a href="tapijt.php">   tapijt</a></div>
<div id="LINK"><a href="informatie.php?info_id=1">     informatie</a></div>
</div>
<div class="THIRD" id="Background2">
<div id="LINK"><a href="/">behang</a></div>
<div id="LINK"><a href="digitaal.php">   digitaal</a><a href="#"></a></div>
<div id="LINK">   laminaat</div>
<div id="LINK"><a href="tapijt.php">   tapijt</a></div>
<div id="LINK"><a href="informatie.php?info_id=1">     informatie</a></div>
</div>
<div class="FOURTH" id="Background3">
<div id="LINK"><a href="/">behang</a></div>
<div id="LINK"><a href="digitaal.php">   digitaal</a></div>
<div id="LINK"><a href="laminaat.php">   laminaat</a></div>
<div id="LINK">   tapijt</div>
<div id="LINK"><a href="informatie.php?info_id=1">     informatie</a></div>
</div>
<div class="FIFTH" id="Background4">
<div id="LINK"><a href="/">behang</a></div>
<div id="LINK"><a href="digitaal.php">   digitaal</a></div>
<div id="LINK"><a href="laminaat.php">   laminaat</a></div>
<div id="LINK"><a href="tapijt.php">   tapijt</a></div>
<div id="LINK">     informatie</div>
</div>[/code]

means all other pages don’t have the menu in on top, so needs fix

Simple Java Code Needed

July 29th, 2009 Comments off

I’m trying to build a form where when you click a button a new window opens. There we choose an item and send the item code back to the parent page to populate a text field. After this is done the new window should close automatically. This is the code I’m working with at the moment. I think the head of the child file needs changing.

parent file (parts of it):

Code:
//head:

<script type=”text/javascript”>
targetElement = null;
function addProduct(frm, id) {
if(!frm || !id)
return;
targetElement = frm.elements[id];
var handle = window.open(‘find_product.php’);
}
</script>

//body:

<form id=”frm” name=”frm” action=”#”>
<input name=”code” type=”text” id=”code” size=”10″ />
<input name=”name” type=”text” id=”name” size=”32″ />
<input type=”button” value=”Add Item” onclick=”addProduct(this.form, ‘code’);” />
</form>

child file (parts of it):

Code:
//head:

<script type=”text/javascript”>
function addProduct(frm, id) {
if(!frm || !id)
return;
var elem = frm.elements[id];
if(!elem)
return;
var val = elem.options[elem.selectedIndex].value;
opener.targetElement.value = val;
this.close();
}
</script>

//body:

<form id=”frm” name=”frm” action=”#”>
<input name=”code” type=”hidden” value=”<?php echo $row_rsProducts['ProductID']; ?>” />
<input name=”name” type=”hidden” value=”<?php echo $row_rsProducts['ProductName']; ?>” />
<input type=”button” value=”Add Product” onclick=”addProduct(this.form, ‘code’);” />
</form>

Another thing that I’m not sure how to go round is that forms can’t be nested so after the field is filled in, how can I submit the value? I’d like to use this same field for another form.

Please bid only if you can solve both of these problems.

Bear