473,405 Members | 2,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Error: f.PermissionID has no properties (whyyyyyyyy)

Expand|Select|Wrap|Line Numbers
  1.  
  2. <form method="post" action="javascript:void(0);" name="ShareOptionsForm" onsubmit="if (VerifyForm('ShareOptionsForm')) { AddShareJob(); HideShareOptions(); setTimeout('RefreshCart()', 1000); } else { return false; }">
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.             <p><label for="ContactID">Recipient</label><br />
  10.             <select name="ContactID" id="ContactID" onChange="FadeOutError('RecipientError')">
  11.             <option value="">Select a Recipient...</option>
  12.             <?php
  13.                 if (isset($recipients) && !empty($recipients)) {
  14.                     foreach ($recipients as $recipient) {
  15.                         $recipientText = '';
  16.                         if (!empty($recipient['Company'])) {
  17.                             $recipientText = $recipient['Company'] . ' - ';
  18.                         }
  19.                         $recipientText .= "{$recipient['FirstName']} {$recipient['LastName']}"; /*  ({$recipient['Email']}) */
  20.                         print "<option value=\"{$recipient['ContactID']}\">{$recipientText}</option>\n";
  21.                     }
  22.                 }
  23.             ?>
  24.             </select> or <input type="button" name="AddNewRecipient" id="AddNewRecipient" value="Add New Recipient" onclick="ShowShareNewRecipient();" /></p>
  25.             <div id="RecipientError" class="error" style="display:<?php if (isset($RecipientError)) echo 'block'; else echo 'none'; ?>"><?php if (isset($RecipientError)) echo $RecipientError; ?> </div>
  26.             <h2>Permissions</h2>
  27.  
  28.             <p>Permissions tell us how you want this recipient to be allowed to share these documents. Move the slider below to control the level of permissions.</p>
  29.  
  30.             <div id="PermissionExplanation" style="font-style:italic;font-weight:bold;text-align:center;width:500px;height:35px;"><p>This recipient will not be allowed to share these documents.</p></div>
  31.     <input type="hidden" name="PermissionID" value="1" />        
  32.  
  33. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  34. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  35.             <input type="radio" name="permission" id="permission1" value="152" onclick="ChangePermissionGraphic(152)" />
  36. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  37. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    &nbsp;&nbsp;&nbsp;&nbsp;      
  38.             <input type="radio" name="permission" id="permission2" value="313" onclick="ChangePermissionGraphic(313)"/>
  39.             &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  40. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
  41.   <input type="radio" name="permission" id="permission3" value="466" onclick="ChangePermissionGraphic(466)"/>
  42.  
  43.             <p><img src="images/permission1.jpg" width="500" height="174" alt="Permissions" border="0" id="PermissionGraphic" /></p>
  44.  
  45.             <p>
  46.             <input type="submit" name="Submit" value="Share These Documents" /> &nbsp; <input type="button" name="Cancel" value="Cancel" id="Cancel" onclick="HideShareOptions();" /></p>
  47.  
  48.             <script language="JavaScript" type="text/javascript">
  49.             <!--
  50.             // Script placed here because apparently problems crop up in IE otherwise.
  51.  
  52.  
  53.  
  54.                 var Image1 = new Image();
  55.                 Image1.src = "images/permission1.jpg";
  56.                 var Image2 = new Image();
  57.                 Image2.src = "images/permission2.jpg";
  58.                 var Image3 = new Image();
  59.                 Image3.src = "images/permission3.jpg";
  60.  
  61.  
  62.                 function ChangePermissionGraphic(v) {
  63.  
  64.                 //alert("test from slider");
  65.                     d = document; f = d.ShareOptionsForm;
  66.  
  67.  
  68.                     switch (v) {
  69.                         case 152:
  70.                             d.getElementById('PermissionGraphic').src = 'images/permission1.jpg';
  71.                             d.getElementById('PermissionExplanation').innerHTML = '<p>This recipient will not be allowed to share these documents.</p>';
  72.                             f.PermissionID.value = 1;
  73.                             break;
  74.                         case 313:
  75.                             d.getElementById('PermissionGraphic').src = 'images/permission2.jpg';
  76.                             d.getElementById('PermissionExplanation').innerHTML = '<p>This recipient will be allowed to share these documents with other people, but they will not be allowed to share the documents.</p>';
  77.                         f.PermissionID.value = 2;
  78.  
  79.  
  80.  
  81.  
  82.                             break;
  83.                         case 466:
  84.                             d.getElementById('PermissionGraphic').src = 'images/permission3.jpg';
  85.                             d.getElementById('PermissionExplanation').innerHTML = '<p>These documents can be shared with anybody.</p>';
  86.                             f.PermissionID.value = 3;
  87.                             break;
  88.                     }
  89.                 }
  90.  
  91.  
  92.             //-->
  93.             </script>
  94.  
  95.             </form>
  96.  
  97.  
  98.  
Apr 3 '08 #1
4 1075
pronerd
392 Expert 256MB
I do not see any element in that code that has an "id" attribute of "PermissionID". So when you call that element in your code you are trying to access an object that is null.
Apr 3 '08 #2
Thanks for the quick reply. Per your instructions I added the ID field. and I still get the same error.


<input type="hidden" name="PermissionID" id="PermissionID" value="1" />
Apr 3 '08 #3
However I am able to get it now by

d.getElementById('PermissionID').value


Why is that >???????


f.PermissionID.value = 1 should have worked.
Apr 3 '08 #4
hsriat
1,654 Expert 1GB
I'm not sure why is this not working, but

Try with

f = d.forms['ShareOptionsForm']
OR
d.forms['ShareOptionsForm'].PermissionID.value = 1

If first one works, this means we may not declare form as variable like
f = d.ShareOptionsForm

If seconds works, this means we may not declare any variable to save form in it.

If none works, there's some problem with the other part of the code.

Regards
Apr 3 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Steve Long | last post by:
Hello, I hope this is the right group to post this to. I'm trying to serialize a class I've written and I'd like to be able to serialze to both binary and xml formats. Binary serialization is...
6
by: Peter Frost | last post by:
Please help I don't know if this is possible but what I would really like to do is to use On Error Goto to capture the code that is being executed when an error occurs. Any help would be much...
14
by: Abhi | last post by:
FYI: This message is for the benefit of MS Access Community. I found that this prblem has been encounterd by many but there is hardly any place where a complete solution is posted. So I thought...
19
by: MLH | last post by:
I call the following Sub and Function in frmLaunch's OnOpen event code. I keep getting Property Not Found error for the AllowBypassKey setting. Failure point is line #30 in the Function (not the...
0
by: Kenneth H. Young | last post by:
I am having difficulties with an LDAP client I'm writing. What I have discovered causes the error is when the client queries the LDAP server and a record contains two values entered in one field...
8
by: Kevin Blount | last post by:
I'm tyring to access an object created by using a method from a third party API. The documentation tells me what object should be return, and the properties of that object, but when I try and...
1
by: Gilberto | last post by:
Hello I have a big BIG problem. Im new with acces and ive been creating a db for a month now. It was working perfectly and just after i did a db SPLIT some functions began displaying error 2465. I...
2
Dormilich
by: Dormilich | last post by:
Hi, I'm testing my classes for a web page and I stumble upon an error I don't have a clue what it means: Error: Fatal error: Can't use method return value in write context in "output.php" on...
11
by: xenoix | last post by:
hey there, im reasonably new to C# and im currently writing a backup application which im using as a learning resource. My PC :- Visual Studio 2005 .NET Framework 2 Component Factory Krypton...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.